'use client' /** * Header - figma-v2 品牌導航列 * ============================== * @updated 2026-04-03 Claude Code — 完整對齊 figma-v2 設計 * - brand-area: A + wooo(VT323) + I 混合字體 logo * - page-title: Syne 26px 800 * - lang-btn: pill 樣式 (border-radius 20px) * - avatar: 34px 圓形 #d97757 * * Phase 19: 使用 Z_INDEX.HEADER (30) * @see lib/constants/z-index.ts */ import { useCallback } from 'react' import { useTranslations } from 'next-intl' import { usePathname } from 'next/navigation' import { Z_INDEX } from '@/lib/constants/z-index' // ============================================================================= // Types // ============================================================================= interface HeaderProps { locale: string sidebarCollapsed?: boolean compact?: boolean className?: string } // ============================================================================= // Component // ============================================================================= export function Header({ locale, sidebarCollapsed = false, compact = false, className, }: HeaderProps) { const t = useTranslations('locale') const tDashboard = useTranslations('dashboard') const pathname = usePathname() const switchLocale = useCallback((newLocale: string) => { const newPath = pathname.replace(`/${locale}`, `/${newLocale}`) window.location.href = newPath }, [locale, pathname]) const brandWidth = compact ? 64 : sidebarCollapsed ? 64 : 224 return (
{/* Brand Area — 224px 固定寬,與 sidebar 對齊 */}
{/* NemoClaw mini SVG */}
{/* Brand text: A + wooo + I (figma 混合字體) */} {!compact && !sidebarCollapsed && (
A wooo I
)}
{/* Header Right — page title + lang switcher + avatar */}
{/* Page title */} {tDashboard('title')} {/* ⌘K Command Palette 入口提示 */} {/* Language switcher — pill style */} {/* Avatar — 34px 圓形 #d97757 */}
OG
) }