2025-12-03 21:56:50 +00:00
|
|
|
import { useState } from 'react';
|
|
|
|
|
import { Link, useNavigate } from 'react-router-dom';
|
2025-12-26 08:11:41 +00:00
|
|
|
import { useAuthStore } from '@/features/auth/store/authStore';
|
state-ownership: replace all useAuthStore().user with useUser() hook
- Migrated all hooks: useAuth, useChat, useLogin
- Migrated all components: Header, ProfileForm, FollowButton, LikeButton, PlaylistFollowButton, ChatMessage, ChatMessages, CommentThread, CommentSection, PlaylistList, ChatSidebar, SettingsPage, DashboardPage
- Updated storeSelectors.ts useAuthUser() to use React Query
- All production code now uses useUser() hook instead of Zustand store
- Action 4.1.1.3 and 4.1.1.4 complete
2026-01-14 00:45:42 +00:00
|
|
|
import { useUser } from '@/features/auth/hooks/useUser';
|
2025-12-03 21:56:50 +00:00
|
|
|
import { useUIStore } from '@/stores/ui';
|
|
|
|
|
import { useTranslation } from '@/hooks/useTranslation';
|
|
|
|
|
import { EmailVerificationBadge } from '@/features/auth/components/EmailVerificationBadge';
|
|
|
|
|
import { NotificationMenu } from '@/components/notifications/NotificationMenu';
|
2026-01-15 18:58:02 +00:00
|
|
|
import { RateLimitIndicator } from '@/components/RateLimitIndicator';
|
2025-12-03 21:56:50 +00:00
|
|
|
import { Button } from '@/components/ui/button';
|
|
|
|
|
import { FocusTrap } from '@/components/ui/focus-trap';
|
2025-12-25 11:25:07 +00:00
|
|
|
import { Tooltip } from '@/components/ui/tooltip';
|
feat: Visual masterpiece - true light mode & premium UI
🎨 **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!
2026-01-11 01:32:21 +00:00
|
|
|
import { cn } from '@/lib/utils';
|
2025-12-03 21:56:50 +00:00
|
|
|
import {
|
|
|
|
|
User,
|
|
|
|
|
Settings,
|
|
|
|
|
LogOut,
|
|
|
|
|
Moon,
|
|
|
|
|
Sun,
|
|
|
|
|
Monitor,
|
2025-12-25 11:09:20 +00:00
|
|
|
Search,
|
2026-01-22 16:23:11 +00:00
|
|
|
Command,
|
2026-01-18 11:30:56 +00:00
|
|
|
Menu,
|
2025-12-03 21:56:50 +00:00
|
|
|
} from 'lucide-react';
|
2025-12-25 14:00:35 +00:00
|
|
|
import type { BaseComponentProps } from '../types';
|
2025-12-03 21:56:50 +00:00
|
|
|
|
2026-01-22 16:23:11 +00:00
|
|
|
export interface HeaderProps extends BaseComponentProps { }
|
2025-12-25 14:00:35 +00:00
|
|
|
|
feat: Visual masterpiece - true light mode & premium UI
🎨 **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!
2026-01-11 01:32:21 +00:00
|
|
|
export function Header(_props: HeaderProps) {
|
2025-12-03 21:56:50 +00:00
|
|
|
const [isUserMenuOpen, setIsUserMenuOpen] = useState(false);
|
state-ownership: replace all useAuthStore().user with useUser() hook
- Migrated all hooks: useAuth, useChat, useLogin
- Migrated all components: Header, ProfileForm, FollowButton, LikeButton, PlaylistFollowButton, ChatMessage, ChatMessages, CommentThread, CommentSection, PlaylistList, ChatSidebar, SettingsPage, DashboardPage
- Updated storeSelectors.ts useAuthUser() to use React Query
- All production code now uses useUser() hook instead of Zustand store
- Action 4.1.1.3 and 4.1.1.4 complete
2026-01-14 00:45:42 +00:00
|
|
|
const { logout } = useAuthStore();
|
|
|
|
|
const { data: user } = useUser();
|
2026-01-18 11:30:56 +00:00
|
|
|
const { theme, setTheme, sidebarOpen, setSidebarOpen } = useUIStore();
|
2025-12-03 21:56:50 +00:00
|
|
|
const { t } = useTranslation();
|
|
|
|
|
const navigate = useNavigate();
|
|
|
|
|
|
|
|
|
|
const handleLogout = async () => {
|
|
|
|
|
await logout();
|
|
|
|
|
navigate('/login');
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const toggleTheme = () => {
|
2026-01-22 16:23:11 +00:00
|
|
|
const newTheme = theme === 'light' ? 'dark' : theme === 'dark' ? 'system' : 'light';
|
2025-12-03 21:56:50 +00:00
|
|
|
setTheme(newTheme);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const getThemeIcon = () => {
|
|
|
|
|
switch (theme) {
|
2026-01-22 16:23:11 +00:00
|
|
|
case 'light': return <Sun className="h-4 w-4" />;
|
|
|
|
|
case 'dark': return <Moon className="h-4 w-4" />;
|
|
|
|
|
default: return <Monitor className="h-4 w-4" />;
|
2025-12-03 21:56:50 +00:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return (
|
feat(web): UI premium Discord/Spotify-like — tokens, shadows, focus, layout
Plan UI premium 6–8 semaines (design system, shell, Storybook, a11y):
- Design system: DESIGN_TOKENS.md, APP_SHELL.md, FULL_LAYOUT_PAGE.md. Single source
for layout/shell (index.css), shadows (design-system.css), durations/easing.
- Tokens: shadow-cover-depth, shadow-gold-glow, shadow-fab-glow; layout max-height
(max-h-layout-drawer, max-h-layout-panel, max-h-layout-list). All duration-200/300/500
replaced by --duration-fast/normal/slow. Arbitrary shadows replaced by token classes.
- Shell & player: Sidebar, Header, GlobalPlayer, MiniPlayer, PlayerQueue, PlayerControls,
AudioPlayer use tokens; focus-visible on Sidebar, PlayerQueue, DropdownMenuTrigger/Item,
TabsTrigger. Typography: text-[10px]/[9px] → text-xs where applicable.
- ESLint: no-restricted-syntax (warn) for w-/h-/rounded-/shadow-/text-/spacing arbitrary.
- Scripts: report-arbitrary-values.mjs, capture/compare/generate visual; visual-complete.spec.ts.
- Stories full layout: Dashboard, Playlists, Library, Settings, Profile in DashboardLayout.stories.
- .cursorrules + README: DESIGN_TOKENS, APP_SHELL, visual commands, no arbitrary without justification.
- apps/web/.gitignore: e2e test artifacts (test-results-visual, playwright-report-visual).
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-08 16:15:58 +00:00
|
|
|
<header className="fixed top-0 left-0 right-0 h-header z-50 pointer-events-none">
|
2026-01-22 16:23:11 +00:00
|
|
|
<div className={cn(
|
2026-02-09 22:25:52 +00:00
|
|
|
'absolute top-0 right-0 h-header bg-background/80 backdrop-blur-lg border-b border-border/50 flex items-center justify-between px-4 md:px-6 pointer-events-auto transition-all duration-[var(--duration-fast)]',
|
feat(web): UI premium Discord/Spotify-like — tokens, shadows, focus, layout
Plan UI premium 6–8 semaines (design system, shell, Storybook, a11y):
- Design system: DESIGN_TOKENS.md, APP_SHELL.md, FULL_LAYOUT_PAGE.md. Single source
for layout/shell (index.css), shadows (design-system.css), durations/easing.
- Tokens: shadow-cover-depth, shadow-gold-glow, shadow-fab-glow; layout max-height
(max-h-layout-drawer, max-h-layout-panel, max-h-layout-list). All duration-200/300/500
replaced by --duration-fast/normal/slow. Arbitrary shadows replaced by token classes.
- Shell & player: Sidebar, Header, GlobalPlayer, MiniPlayer, PlayerQueue, PlayerControls,
AudioPlayer use tokens; focus-visible on Sidebar, PlayerQueue, DropdownMenuTrigger/Item,
TabsTrigger. Typography: text-[10px]/[9px] → text-xs where applicable.
- ESLint: no-restricted-syntax (warn) for w-/h-/rounded-/shadow-/text-/spacing arbitrary.
- Scripts: report-arbitrary-values.mjs, capture/compare/generate visual; visual-complete.spec.ts.
- Stories full layout: Dashboard, Playlists, Library, Settings, Profile in DashboardLayout.stories.
- .cursorrules + README: DESIGN_TOKENS, APP_SHELL, visual commands, no arbitrary without justification.
- apps/web/.gitignore: e2e test artifacts (test-results-visual, playwright-report-visual).
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-08 16:15:58 +00:00
|
|
|
sidebarOpen ? 'left-header-expanded' : 'left-header-collapsed',
|
|
|
|
|
'max-lg:left-0'
|
2026-01-22 16:23:11 +00:00
|
|
|
)}>
|
|
|
|
|
|
|
|
|
|
{/* Mobile Sidebar Toggle */}
|
|
|
|
|
<button
|
|
|
|
|
onClick={() => setSidebarOpen(!sidebarOpen)}
|
2026-02-10 21:59:51 +00:00
|
|
|
className="lg:hidden p-2 rounded-lg hover:bg-muted/50 text-muted-foreground hover:text-foreground mr-2 transition-colors duration-[var(--duration-fast)]"
|
2026-01-22 16:23:11 +00:00
|
|
|
>
|
|
|
|
|
<Menu className="w-5 h-5" />
|
|
|
|
|
</button>
|
|
|
|
|
|
2026-02-10 21:52:31 +00:00
|
|
|
{/* Search — Spotify-style: navigate to /search on focus or Enter */}
|
2026-02-10 21:51:51 +00:00
|
|
|
<div className="flex-1 max-w-md relative hidden md:block group">
|
2026-02-10 21:52:31 +00:00
|
|
|
<div
|
|
|
|
|
role="search"
|
|
|
|
|
className="relative flex items-center group/search rounded-full focus-within:ring-2 focus-within:ring-primary/50 transition-all duration-[var(--duration-fast)]"
|
|
|
|
|
>
|
2026-02-10 21:51:51 +00:00
|
|
|
<Search className="absolute left-3 w-4 h-4 text-muted-foreground pointer-events-none" />
|
|
|
|
|
<input
|
2026-02-10 21:52:31 +00:00
|
|
|
type="search"
|
2026-02-10 21:51:51 +00:00
|
|
|
placeholder="What do you want to play?"
|
2026-02-10 21:52:31 +00:00
|
|
|
aria-label="Rechercher des pistes, artistes, playlists"
|
|
|
|
|
className="w-full h-10 pl-10 pr-4 bg-muted/30 border-0 rounded-full text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-0 focus-visible:ring-2 focus-visible:ring-primary/50 focus-visible:ring-inset transition-all duration-[var(--duration-fast)]"
|
|
|
|
|
onKeyDown={(e) => {
|
|
|
|
|
if (e.key === 'Enter') {
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
const q = (e.currentTarget.value || '').trim();
|
|
|
|
|
navigate(q ? `/search?q=${encodeURIComponent(q)}` : '/search');
|
|
|
|
|
}
|
|
|
|
|
}}
|
2026-02-10 21:51:51 +00:00
|
|
|
/>
|
|
|
|
|
<kbd className="absolute right-3 hidden sm:inline-flex items-center gap-0.5 px-2 py-0.5 rounded bg-muted/50 text-xs font-medium text-muted-foreground">
|
|
|
|
|
<Command className="w-3 h-3" />K
|
|
|
|
|
</kbd>
|
2025-12-25 11:09:20 +00:00
|
|
|
</div>
|
2026-02-10 21:51:51 +00:00
|
|
|
</div>
|
2025-12-25 11:09:20 +00:00
|
|
|
|
2026-01-22 16:23:11 +00:00
|
|
|
{/* Right Actions */}
|
style(ui): Spotify-like palette, player, sidebar and dashboard polish
- Dark palette: background 0.11, card 0.14, sidebar 0.08 (Spotify #121212 feel)
- MiniPlayer: h-16, thinner progress bar, compact cover/times, rounded actions
- Sidebar: minimal header, lighter section labels, clean nav hover (no heavy border)
- Header: h-16, rounded search pill, compact user pill and dropdown
- Dashboard: pt-20 to match header, StatCard typography and spacing tweaks
- Visual: register-page snapshot + small maxDiffPixels tolerance for font variance
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-07 19:19:59 +00:00
|
|
|
<div className="flex items-center gap-1 ml-2">
|
2025-12-25 11:09:20 +00:00
|
|
|
|
2026-02-10 08:28:43 +00:00
|
|
|
<div className="hidden xl:flex items-center gap-2 mr-2 px-2.5 py-1 rounded-full bg-muted/30 text-muted-foreground">
|
style(ui): Spotify-like palette, player, sidebar and dashboard polish
- Dark palette: background 0.11, card 0.14, sidebar 0.08 (Spotify #121212 feel)
- MiniPlayer: h-16, thinner progress bar, compact cover/times, rounded actions
- Sidebar: minimal header, lighter section labels, clean nav hover (no heavy border)
- Header: h-16, rounded search pill, compact user pill and dropdown
- Dashboard: pt-20 to match header, StatCard typography and spacing tweaks
- Visual: register-page snapshot + small maxDiffPixels tolerance for font variance
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-07 19:19:59 +00:00
|
|
|
<span className="w-1.5 h-1.5 rounded-full bg-primary shrink-0" />
|
|
|
|
|
<span className="text-xs">Online</span>
|
feat: Visual masterpiece - true light mode & premium UI
🎨 **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!
2026-01-11 01:32:21 +00:00
|
|
|
</div>
|
2025-12-03 21:56:50 +00:00
|
|
|
|
|
|
|
|
<NotificationMenu />
|
2026-01-15 18:58:02 +00:00
|
|
|
<RateLimitIndicator />
|
|
|
|
|
|
2026-02-10 08:28:43 +00:00
|
|
|
<div className="h-6 w-px bg-border mx-1" aria-hidden />
|
2026-01-22 16:23:11 +00:00
|
|
|
|
2026-02-10 21:51:51 +00:00
|
|
|
<Tooltip content={t('common.changeTheme')}>
|
|
|
|
|
<Button
|
|
|
|
|
variant="ghost"
|
|
|
|
|
size="icon"
|
|
|
|
|
onClick={toggleTheme}
|
2026-02-10 21:59:51 +00:00
|
|
|
className="min-h-10 min-w-10 rounded-full hover:bg-muted/50 text-muted-foreground hover:text-foreground transition-colors duration-[var(--duration-fast)]"
|
2026-02-10 21:51:51 +00:00
|
|
|
>
|
|
|
|
|
{getThemeIcon()}
|
|
|
|
|
</Button>
|
|
|
|
|
</Tooltip>
|
2025-12-25 11:25:07 +00:00
|
|
|
|
style(ui): Spotify-like palette, player, sidebar and dashboard polish
- Dark palette: background 0.11, card 0.14, sidebar 0.08 (Spotify #121212 feel)
- MiniPlayer: h-16, thinner progress bar, compact cover/times, rounded actions
- Sidebar: minimal header, lighter section labels, clean nav hover (no heavy border)
- Header: h-16, rounded search pill, compact user pill and dropdown
- Dashboard: pt-20 to match header, StatCard typography and spacing tweaks
- Visual: register-page snapshot + small maxDiffPixels tolerance for font variance
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-07 19:19:59 +00:00
|
|
|
{/* User — compact pill */}
|
|
|
|
|
<div className="relative">
|
2026-01-22 16:23:11 +00:00
|
|
|
<button
|
feat: Visual masterpiece - true light mode & premium UI
🎨 **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!
2026-01-11 01:32:21 +00:00
|
|
|
onClick={() => setIsUserMenuOpen(!isUserMenuOpen)}
|
2026-02-10 21:59:51 +00:00
|
|
|
className="flex items-center gap-2 pl-0.5 pr-2 py-0.5 rounded-full hover:bg-muted/50 transition-colors duration-[var(--duration-fast)] focus:outline-none focus:ring-2 focus:ring-ring group"
|
feat: Visual masterpiece - true light mode & premium UI
🎨 **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!
2026-01-11 01:32:21 +00:00
|
|
|
>
|
2026-02-09 22:25:52 +00:00
|
|
|
<div className="w-8 h-8 rounded-full bg-primary/20 flex items-center justify-center shrink-0 group-hover:ring-2 group-hover:ring-primary/50 group-hover:scale-105 transition-all">
|
style(ui): Spotify-like palette, player, sidebar and dashboard polish
- Dark palette: background 0.11, card 0.14, sidebar 0.08 (Spotify #121212 feel)
- MiniPlayer: h-16, thinner progress bar, compact cover/times, rounded actions
- Sidebar: minimal header, lighter section labels, clean nav hover (no heavy border)
- Header: h-16, rounded search pill, compact user pill and dropdown
- Dashboard: pt-20 to match header, StatCard typography and spacing tweaks
- Visual: register-page snapshot + small maxDiffPixels tolerance for font variance
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-07 19:19:59 +00:00
|
|
|
<span className="text-xs font-semibold text-primary">
|
|
|
|
|
{user?.username?.substring(0, 2).toUpperCase() || 'VZ'}
|
|
|
|
|
</span>
|
feat: Visual masterpiece - true light mode & premium UI
🎨 **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!
2026-01-11 01:32:21 +00:00
|
|
|
</div>
|
style(ui): Spotify-like palette, player, sidebar and dashboard polish
- Dark palette: background 0.11, card 0.14, sidebar 0.08 (Spotify #121212 feel)
- MiniPlayer: h-16, thinner progress bar, compact cover/times, rounded actions
- Sidebar: minimal header, lighter section labels, clean nav hover (no heavy border)
- Header: h-16, rounded search pill, compact user pill and dropdown
- Dashboard: pt-20 to match header, StatCard typography and spacing tweaks
- Visual: register-page snapshot + small maxDiffPixels tolerance for font variance
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-07 19:19:59 +00:00
|
|
|
<span className="hidden lg:block text-sm font-medium text-foreground truncate max-w-24">
|
|
|
|
|
{user?.username}
|
|
|
|
|
</span>
|
2026-01-22 16:23:11 +00:00
|
|
|
</button>
|
2025-12-03 21:56:50 +00:00
|
|
|
|
|
|
|
|
{isUserMenuOpen && (
|
2026-01-22 16:23:11 +00:00
|
|
|
<FocusTrap active={isUserMenuOpen} onEscape={() => setIsUserMenuOpen(false)}>
|
2026-02-10 08:28:43 +00:00
|
|
|
<div className="absolute right-0 top-full mt-2 w-56 bg-card backdrop-blur-xl border border-border rounded-xl shadow-xl p-2 z-50 animate-scaleIn origin-top-right">
|
|
|
|
|
<div className="px-3 py-2.5 border-b border-border mb-1">
|
style(ui): Spotify-like palette, player, sidebar and dashboard polish
- Dark palette: background 0.11, card 0.14, sidebar 0.08 (Spotify #121212 feel)
- MiniPlayer: h-16, thinner progress bar, compact cover/times, rounded actions
- Sidebar: minimal header, lighter section labels, clean nav hover (no heavy border)
- Header: h-16, rounded search pill, compact user pill and dropdown
- Dashboard: pt-20 to match header, StatCard typography and spacing tweaks
- Visual: register-page snapshot + small maxDiffPixels tolerance for font variance
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-07 19:19:59 +00:00
|
|
|
<p className="text-sm font-semibold text-foreground truncate">{user?.username}</p>
|
|
|
|
|
<p className="text-xs text-muted-foreground truncate">{user?.email}</p>
|
2026-01-22 16:23:11 +00:00
|
|
|
{!user?.is_verified && (
|
|
|
|
|
<div className="mt-2 flex justify-center"><EmailVerificationBadge verified={false} /></div>
|
feat: Visual masterpiece - true light mode & premium UI
🎨 **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!
2026-01-11 01:32:21 +00:00
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
|
2026-01-22 16:23:11 +00:00
|
|
|
<div className="p-1 space-y-0.5">
|
2026-02-10 21:59:51 +00:00
|
|
|
<Link to="/profile" className="flex items-center gap-3 px-3 py-2.5 text-sm text-muted-foreground hover:text-foreground hover:bg-muted rounded-xl transition-colors duration-[var(--duration-fast)]">
|
2026-01-22 16:23:11 +00:00
|
|
|
<User className="w-4 h-4" /> Profil
|
feat: Visual masterpiece - true light mode & premium UI
🎨 **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!
2026-01-11 01:32:21 +00:00
|
|
|
</Link>
|
2026-02-10 21:59:51 +00:00
|
|
|
<Link to="/settings" className="flex items-center gap-3 px-3 py-2.5 text-sm text-muted-foreground hover:text-foreground hover:bg-muted rounded-xl transition-colors duration-[var(--duration-fast)]">
|
2026-01-22 16:23:11 +00:00
|
|
|
<Settings className="w-4 h-4" /> Paramètres
|
feat: Visual masterpiece - true light mode & premium UI
🎨 **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!
2026-01-11 01:32:21 +00:00
|
|
|
</Link>
|
2026-01-22 16:23:11 +00:00
|
|
|
</div>
|
|
|
|
|
|
2026-02-10 08:28:43 +00:00
|
|
|
<div className="h-px bg-border my-1" aria-hidden />
|
2026-01-22 16:23:11 +00:00
|
|
|
|
|
|
|
|
<div className="p-1">
|
2026-02-10 21:59:51 +00:00
|
|
|
<button onClick={handleLogout} className="w-full flex items-center gap-3 px-3 py-2.5 text-sm text-destructive hover:bg-destructive/10 rounded-xl transition-colors duration-[var(--duration-fast)]">
|
2026-01-22 16:23:11 +00:00
|
|
|
<LogOut className="w-4 h-4" /> Déconnexion
|
feat: Visual masterpiece - true light mode & premium UI
🎨 **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!
2026-01-11 01:32:21 +00:00
|
|
|
</button>
|
2025-12-03 21:56:50 +00:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</FocusTrap>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</header>
|
|
|
|
|
);
|
2026-01-22 16:23:11 +00:00
|
|
|
}
|