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 (
|
2026-01-22 16:23:11 +00:00
|
|
|
<header className="fixed top-0 left-0 right-0 h-20 z-50 pointer-events-none">
|
|
|
|
|
<div className={cn(
|
2026-02-07 14:25:44 +00:00
|
|
|
"absolute top-0 right-0 h-20 bg-gradient-to-b from-background/90 via-background/80 to-transparent backdrop-blur-[8px] flex items-center justify-between px-6 pointer-events-auto transition-all duration-[var(--duration-normal)]",
|
2026-01-22 16:23:11 +00:00
|
|
|
// Adapter la largeur et la position en fonction de la sidebar
|
|
|
|
|
sidebarOpen ? "left-72" : "left-20",
|
|
|
|
|
// Sur mobile, full width
|
|
|
|
|
"max-lg:left-0"
|
|
|
|
|
)}>
|
|
|
|
|
|
|
|
|
|
{/* Mobile Sidebar Toggle */}
|
|
|
|
|
<button
|
|
|
|
|
onClick={() => setSidebarOpen(!sidebarOpen)}
|
2026-02-07 14:25:44 +00:00
|
|
|
className="lg:hidden p-2 rounded-xl hover:bg-muted text-muted-foreground hover:text-foreground mr-4"
|
2026-01-22 16:23:11 +00:00
|
|
|
>
|
|
|
|
|
<Menu className="w-5 h-5" />
|
|
|
|
|
</button>
|
|
|
|
|
|
|
|
|
|
{/* Global Search Omnibox */}
|
|
|
|
|
<div className="flex-1 max-w-xl relative hidden md:block group">
|
|
|
|
|
<div className="relative flex items-center group/search">
|
2026-02-07 14:25:44 +00:00
|
|
|
<Search className="absolute left-4 w-4 h-4 text-muted-foreground group-hover/search:text-primary transition-colors duration-[var(--duration-normal)]" />
|
2026-01-22 16:23:11 +00:00
|
|
|
<input
|
|
|
|
|
type="text"
|
|
|
|
|
placeholder="Search Network..."
|
2026-02-07 14:25:44 +00:00
|
|
|
className="w-full h-11 pl-12 pr-16 bg-muted/50 border border-border rounded-xl text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:bg-card focus:border-primary/30 focus:ring-4 focus:ring-primary/10 transition-all duration-[var(--duration-normal)] shadow-inner"
|
2026-01-22 16:23:11 +00:00
|
|
|
/>
|
2026-02-07 14:25:44 +00:00
|
|
|
<div className="absolute right-3 px-2 py-1 rounded-md bg-white/5 border border-white/5 text-[10px] font-mono font-bold text-muted-foreground group-hover/search:text-foreground group-hover/search:bg-white/10 transition-colors">
|
2026-01-22 16:23:11 +00:00
|
|
|
CMD+K
|
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-25 11:09:20 +00:00
|
|
|
</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>
|
2025-12-25 11:09:20 +00:00
|
|
|
|
2026-01-22 16:23:11 +00:00
|
|
|
{/* Right Actions */}
|
|
|
|
|
<div className="flex items-center gap-3 ml-4">
|
2025-12-25 11:09:20 +00:00
|
|
|
|
2026-01-22 16:23:11 +00:00
|
|
|
<div className="hidden xl:flex items-center gap-2 mr-4 px-3 py-1.5 rounded-full bg-kodo-cyan/5 border border-kodo-cyan/10">
|
2026-02-07 14:25:44 +00:00
|
|
|
<div className="w-1.5 h-1.5 rounded-full bg-primary animate-pulse shadow-[0_0_8px_hsl(var(--primary)/0.5)]" />
|
|
|
|
|
<span className="text-[10px] font-mono text-primary uppercase font-bold tracking-tight">
|
2026-01-22 16:23:11 +00:00
|
|
|
Network Stable
|
2026-01-13 18:47:57 +00:00
|
|
|
</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-01-22 16:23:11 +00:00
|
|
|
<div className="h-8 w-px bg-gradient-to-b from-transparent via-white/10 to-transparent mx-2" />
|
|
|
|
|
|
|
|
|
|
{/* Theme Toggle */}
|
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
|
|
|
<Tooltip content={t('common.changeTheme')}>
|
2025-12-03 21:56:50 +00:00
|
|
|
<Button
|
2025-12-13 02:34:34 +00:00
|
|
|
variant="ghost"
|
|
|
|
|
size="icon"
|
2025-12-25 11:25:07 +00:00
|
|
|
onClick={toggleTheme}
|
2026-02-07 14:25:44 +00:00
|
|
|
className="w-9 h-9 rounded-xl hover:bg-muted hover:text-foreground text-muted-foreground"
|
2025-12-03 21:56:50 +00:00
|
|
|
>
|
2025-12-25 11:25:07 +00:00
|
|
|
{getThemeIcon()}
|
2025-12-03 21:56:50 +00:00
|
|
|
</Button>
|
2025-12-25 11:25:07 +00:00
|
|
|
</Tooltip>
|
|
|
|
|
|
2026-01-22 16:23:11 +00:00
|
|
|
{/* User Profile */}
|
|
|
|
|
<div className="relative ml-2">
|
|
|
|
|
<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-07 14:25:44 +00:00
|
|
|
className="flex items-center gap-3 p-1.5 pr-4 rounded-full hover:bg-white/5 transition-all border border-transparent focus:outline-none focus:ring-2 focus:ring-primary/50 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-07 14:25:44 +00:00
|
|
|
<div className="w-9 h-9 rounded-full bg-gradient-to-br from-primary to-primary/80 p-0.5 shadow-lg shadow-primary/10 group-hover:shadow-primary/30 transition-shadow duration-300">
|
|
|
|
|
<div className="w-full h-full rounded-full bg-card flex items-center justify-center overflow-hidden">
|
2026-01-22 16:23:11 +00:00
|
|
|
{/* Placeholder Avatar */}
|
|
|
|
|
<span className="text-xs font-bold text-white group-hover:scale-110 transition-transform duration-300">
|
|
|
|
|
{user?.username?.substring(0, 2).toUpperCase() || 'VZ'}
|
|
|
|
|
</span>
|
|
|
|
|
</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="hidden lg:block text-left">
|
2026-02-07 14:25:44 +00:00
|
|
|
<div className="text-xs font-bold text-white leading-none mb-1 group-hover:text-primary transition-colors">
|
2026-01-13 18:47:57 +00:00
|
|
|
{user?.username}
|
2026-01-22 16:23:11 +00:00
|
|
|
</div>
|
2026-02-07 14:25:44 +00:00
|
|
|
<div className="text-[9px] text-muted-foreground uppercase tracking-wider font-mono">
|
2026-01-22 16:23:11 +00:00
|
|
|
LVL. 01
|
|
|
|
|
</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
|
|
|
</button>
|
2025-12-03 21:56:50 +00:00
|
|
|
|
|
|
|
|
{isUserMenuOpen && (
|
2026-01-22 16:23:11 +00:00
|
|
|
<FocusTrap active={isUserMenuOpen} onEscape={() => setIsUserMenuOpen(false)}>
|
|
|
|
|
<div className="absolute right-0 top-full mt-2 w-64 bg-kodo-ink/90 backdrop-blur-xl border border-white/10 rounded-2xl shadow-2xl p-2 z-50 animate-scaleIn origin-top-right">
|
|
|
|
|
<div className="px-3 py-3 border-b border-white/5 mb-1">
|
|
|
|
|
<p className="text-sm font-bold text-white truncate text-center mb-1">{user?.username}</p>
|
2026-02-07 14:25:44 +00:00
|
|
|
<p className="text-xs text-muted-foreground truncate text-center font-mono">{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-07 14:25:44 +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">
|
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-07 14:25:44 +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">
|
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>
|
|
|
|
|
|
|
|
|
|
<div className="h-px bg-white/5 my-1" />
|
|
|
|
|
|
|
|
|
|
<div className="p-1">
|
2026-02-07 14:25:44 +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">
|
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
|
|
|
}
|