🎨 **True Light/Dark Mode** - Implemented proper light mode with inverted color scheme - Smooth theme transitions (0.3s ease) - Light mode colors: white backgrounds, dark text, vibrant accents - System theme detection with proper class application 🌈 **Enhanced Theme System** - 4 color themes work in both light and dark modes - Cyber (cyan/magenta), Ocean (blue/teal), Forest (green/lime), Sunset (orange/purple) - Theme-specific glassmorphism effects - Proper contrast in light mode ✨ **Premium Animations** - Float, glow-pulse, slide-in, scale-in, rotate-in animations - Smooth page transitions - Hover effects with depth (lift, glow, scale) - Micro-interactions on all interactive elements 🎯 **Visual Polish** - Enhanced glassmorphism for light/dark modes - Custom scrollbar with theme colors - Beautiful text selection - Focus indicators for accessibility - Premium utility classes 🔧 **Technical Improvements** - Updated UIStore to properly apply light/dark classes - Added data-theme attribute for CSS targeting - Smooth scroll behavior - Optimized transitions The app is now a visual masterpiece with perfect light/dark mode support!
57 lines
2.1 KiB
SQL
57 lines
2.1 KiB
SQL
-- Migration for Social Features: Posts, Comments, Likes
|
|
|
|
-- Create PostType enum if not exists (simulated with check constraint or text)
|
|
-- We'll use TEXT for simplicity as per models.go
|
|
|
|
CREATE TABLE IF NOT EXISTS posts (
|
|
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
|
user_id UUID NOT NULL REFERENCES users(id) ON DELETE CASCADE,
|
|
content TEXT,
|
|
type VARCHAR(50) DEFAULT 'status',
|
|
|
|
track_id UUID REFERENCES tracks(id) ON DELETE SET NULL,
|
|
playlist_id UUID REFERENCES playlists(id) ON DELETE SET NULL,
|
|
|
|
like_count INT DEFAULT 0,
|
|
comment_count INT DEFAULT 0,
|
|
|
|
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
|
|
updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
|
|
deleted_at TIMESTAMP WITH TIME ZONE
|
|
);
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_posts_user_id ON posts(user_id);
|
|
CREATE INDEX IF NOT EXISTS idx_posts_deleted_at ON posts(deleted_at);
|
|
CREATE INDEX IF NOT EXISTS idx_posts_created_at ON posts(created_at DESC);
|
|
|
|
-- Comments
|
|
CREATE TABLE IF NOT EXISTS comments (
|
|
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
|
user_id UUID NOT NULL REFERENCES users(id) ON DELETE CASCADE,
|
|
target_id UUID NOT NULL,
|
|
target_type VARCHAR(50) NOT NULL,
|
|
content TEXT NOT NULL,
|
|
|
|
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
|
|
updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
|
|
deleted_at TIMESTAMP WITH TIME ZONE
|
|
);
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_comments_user_id ON comments(user_id);
|
|
CREATE INDEX IF NOT EXISTS idx_comments_target ON comments(target_type, target_id);
|
|
CREATE INDEX IF NOT EXISTS idx_comments_deleted_at ON comments(deleted_at);
|
|
|
|
-- Likes
|
|
CREATE TABLE IF NOT EXISTS likes (
|
|
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
|
user_id UUID NOT NULL REFERENCES users(id) ON DELETE CASCADE,
|
|
target_id UUID NOT NULL,
|
|
target_type VARCHAR(50) NOT NULL,
|
|
|
|
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
|
|
|
|
UNIQUE(user_id, target_id, target_type)
|
|
);
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_likes_user_id ON likes(user_id);
|
|
CREATE INDEX IF NOT EXISTS idx_likes_target ON likes(target_type, target_id);
|