import type { IconName } from '$lib/components/ui/icons'; export type NavId = | 'projects' | 'workbench' | 'image' | 'video' | 'tasks' | 'agents' | 'connections' | 'models' | 'settings'; export interface NavItem { id: NavId; labelKey: string; icon: IconName; href: string; } // Order is fixed by spec-v2 §3: 项目 / 创作工作台 / 生图 / 生视频 / 生成任务 / // 智能体 / ComfyUI 连接 / 模型设置 / 设置. HEL-649 §二 puts the connection // and settings entries at the foot of the 60px rail. export const NAV_MAIN: NavItem[] = [ { id: 'projects', labelKey: 'shell.navProjects', icon: 'home', href: '/' }, { id: 'workbench', labelKey: 'shell.navWorkbench', icon: 'story', href: '/workbench' }, { id: 'image', labelKey: 'shell.navImage', icon: 'image', href: '/image' }, { id: 'video', labelKey: 'shell.navVideo', icon: 'film', href: '/video' }, { id: 'tasks', labelKey: 'shell.navTasks', icon: 'queue', href: '/tasks' }, { id: 'agents', labelKey: 'shell.navAgents', icon: 'sparkle', href: '/agents' }, ]; export const NAV_FOOT: NavItem[] = [ { id: 'connections', labelKey: 'shell.navConnections', icon: 'link', href: '/connections' }, { id: 'models', labelKey: 'shell.navModels', icon: 'assets', href: '/models' }, { id: 'settings', labelKey: 'shell.navSettings', icon: 'settings', href: '/settings' }, ]; export const NAV: NavItem[] = [...NAV_MAIN, ...NAV_FOOT]; export interface TabItem { id: 'projects' | 'workbench' | 'generate'; labelKey: string; icon: IconName; href: string; /** Pages that light this tab up. */ covers: NavId[]; } /** ≤760px bottom tab bar (§二): 项目 / 创作 / 生成 / 更多. */ export const TABS: TabItem[] = [ { id: 'projects', labelKey: 'shell.tabProjects', icon: 'home', href: '/', covers: ['projects'] }, { id: 'workbench', labelKey: 'shell.tabCreate', icon: 'story', href: '/workbench', covers: ['workbench'] }, { id: 'generate', labelKey: 'shell.tabGenerate', icon: 'image', href: '/image', covers: ['image', 'video'], }, ]; /** * Every page a tab does not link to directly lives in the 更多 sheet. 生视频 * is still its own route, so it is listed there too until the two * generation pages merge. */ export const MORE_ITEMS: NavItem[] = NAV.filter( (item) => !TABS.some((tab) => tab.href === item.href), );