Phase 1:
- S0: Fix open redirect (safeNavigate), delete AuthContext/legacy auth, encrypt API keys, gitignore .env files
- S1: Split client.ts god object into 5 modules, unify toast system, delete unused Sidebar
- S2: Add glass button variant, migrate 32 z-index to SUMI tokens, fix card dark mode
- S3: Skip nav link, aria-hidden on icons, focus-visible ring fixes, alt attrs, aria-live regions
- S4: React.memo on list items, fix key={index}, loading=lazy on images
- S5: Branded loading screen, page transitions respect reduced-motion, LikeButton micro-interaction, i18n sidebar/header
Phase 2 Sprint 6:
- Wire Tailwind shadow utilities to SUMI tokens in @theme block (fixes 50+ files)
- Define shadow-card/shadow-card-hover tokens
- Remove dark:shadow-none workarounds from card.tsx (SUMI handles per-theme shadows)
Co-authored-by: Cursor <cursoragent@cursor.com>
62 lines
No EOL
2 KiB
TypeScript
62 lines
No EOL
2 KiB
TypeScript
import type { ReactNode } from 'react';
|
|
import { Header } from './Header';
|
|
import { Sidebar } from './Sidebar';
|
|
import { GlobalPlayer } from '@/features/player/components/GlobalPlayer';
|
|
import { useUIStore } from '@/stores/ui';
|
|
import { cn } from '@/lib/utils';
|
|
import { AstralBackground } from '../ui/AstralBackground';
|
|
|
|
interface DashboardLayoutProps {
|
|
children: ReactNode;
|
|
}
|
|
|
|
/**
|
|
* Layout principal "App Shell" - Veza Professional V2
|
|
*
|
|
* Architecture:
|
|
* - Body: Fixed viewport (overflow-hidden)
|
|
* - Sidebar: Fixed left, z-index high
|
|
* - Main: Scrollable container independent of window
|
|
* - Header: Sticky top within Main
|
|
*/
|
|
export function DashboardLayout({ children }: DashboardLayoutProps) {
|
|
const { sidebarOpen } = useUIStore();
|
|
|
|
return (
|
|
<div className="flex h-screen w-full overflow-hidden relative bg-background">
|
|
{/* 1. Global Background (Fixed z-0) */}
|
|
<AstralBackground />
|
|
|
|
{/* 2. Fixed Sidebar (z-90) */}
|
|
<Sidebar />
|
|
|
|
{/* 3. Main Content Area (The only thing that scrolls) */}
|
|
<div
|
|
className={cn(
|
|
'flex-1 flex flex-col h-full min-w-0 relative z-[var(--sumi-z-raised)] transition-all duration-[var(--sumi-duration-slow)] ease-[var(--sumi-ease-in-out)]',
|
|
sidebarOpen ? 'lg:ml-main-expanded' : 'lg:ml-main-collapsed',
|
|
'max-lg:ml-0'
|
|
)}
|
|
>
|
|
{/* Header is part of the flow but stays at top */}
|
|
<Header />
|
|
|
|
{/* Scrollable Content Container */}
|
|
<main
|
|
id="main-content"
|
|
className="flex-1 overflow-y-auto overflow-x-hidden pt-main pb-main px-4 md:px-8 custom-scrollbar"
|
|
data-scroll-container="main"
|
|
>
|
|
<div className="max-w-layout-content mx-auto w-full">
|
|
{children}
|
|
</div>
|
|
</main>
|
|
|
|
{/* Floating Player: wrapper constrains width to main area; GlobalPlayer is fixed inside */}
|
|
<div className="absolute bottom-0 left-0 right-0 z-50 w-full min-w-0" aria-label="Player bar container">
|
|
<GlobalPlayer />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
} |