2025-12-03 21:56:50 +00:00
|
|
|
import type { ReactNode } from 'react';
|
|
|
|
|
import { Header } from './Header';
|
|
|
|
|
import { Sidebar } from './Sidebar';
|
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 { GlobalPlayer } from '@/features/player/components/GlobalPlayer';
|
2026-01-18 12:32:17 +00:00
|
|
|
import { useUIStore } from '@/stores/ui';
|
|
|
|
|
import { cn } from '@/lib/utils';
|
2026-01-18 21:36:15 +00:00
|
|
|
import { AstralBackground } from '../ui/AstralBackground';
|
2025-12-03 21:56:50 +00:00
|
|
|
|
|
|
|
|
interface DashboardLayoutProps {
|
|
|
|
|
children: ReactNode;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
2026-01-22 16:23:11 +00:00
|
|
|
* Layout principal "App Shell" - Veza Professional V2
|
2026-01-18 12:32:17 +00:00
|
|
|
*
|
2026-01-22 16:23:11 +00:00
|
|
|
* Architecture:
|
|
|
|
|
* - Body: Fixed viewport (overflow-hidden)
|
|
|
|
|
* - Sidebar: Fixed left, z-index high
|
|
|
|
|
* - Main: Scrollable container independent of window
|
|
|
|
|
* - Header: Sticky top within Main
|
2025-12-03 21:56:50 +00:00
|
|
|
*/
|
|
|
|
|
export function DashboardLayout({ children }: DashboardLayoutProps) {
|
2026-01-18 12:32:17 +00:00
|
|
|
const { sidebarOpen } = useUIStore();
|
2026-01-18 21:27:53 +00:00
|
|
|
|
2025-12-03 21:56:50 +00:00
|
|
|
return (
|
2026-02-07 14:25:44 +00:00
|
|
|
<div className="flex h-screen w-full overflow-hidden relative bg-background">
|
2026-01-22 16:23:11 +00:00
|
|
|
{/* 1. Global Background (Fixed z-0) */}
|
2026-01-18 21:36:15 +00:00
|
|
|
<AstralBackground />
|
2026-01-22 16:23:11 +00:00
|
|
|
|
|
|
|
|
{/* 2. Fixed Sidebar (z-90) */}
|
2025-12-03 21:56:50 +00:00
|
|
|
<Sidebar />
|
2026-01-22 16:23:11 +00:00
|
|
|
|
|
|
|
|
{/* 3. Main Content Area (The only thing that scrolls) */}
|
2026-01-18 21:27:53 +00:00
|
|
|
<div
|
2026-01-18 12:32:17 +00:00
|
|
|
className={cn(
|
2026-01-22 16:23:11 +00:00
|
|
|
'flex-1 flex flex-col h-full relative z-10 transition-all duration-500 ease-in-out',
|
|
|
|
|
// Desktop margins: calculated precisely based on sidebar width + gap
|
|
|
|
|
sidebarOpen ? 'lg:ml-72' : 'lg:ml-28',
|
|
|
|
|
// Mobile: no margin (sidebar is overlay)
|
|
|
|
|
'ml-0'
|
2026-01-18 12:32:17 +00:00
|
|
|
)}
|
|
|
|
|
>
|
2026-01-22 16:23:11 +00:00
|
|
|
{/* Header is part of the flow but stays at top */}
|
2025-12-03 21:56:50 +00:00
|
|
|
<Header />
|
2026-01-22 16:23:11 +00:00
|
|
|
|
|
|
|
|
{/* Scrollable Content Container */}
|
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
|
|
|
{/* pt-20: content below fixed header (h-16) */}
|
2026-01-22 16:23:11 +00:00
|
|
|
{/* pb-32 ensures content isn't hidden by the floating player */}
|
|
|
|
|
<main
|
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
|
|
|
className="flex-1 overflow-y-auto overflow-x-hidden pt-20 pb-32 px-4 md:px-8 custom-scrollbar"
|
2026-01-22 16:23:11 +00:00
|
|
|
id="main-scroll-container"
|
|
|
|
|
>
|
2026-02-05 13:20:06 +00:00
|
|
|
<div className="max-w-layout-content mx-auto w-full">
|
2026-01-22 16:23:11 +00:00
|
|
|
{children}
|
|
|
|
|
</div>
|
|
|
|
|
</main>
|
|
|
|
|
|
|
|
|
|
{/* Floating Player (Fixed at bottom of screen, not scroll container) */}
|
|
|
|
|
<div className="absolute bottom-0 left-0 right-0 z-50">
|
|
|
|
|
<GlobalPlayer />
|
|
|
|
|
</div>
|
2025-12-03 21:56:50 +00:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
2026-01-22 16:23:11 +00:00
|
|
|
}
|