- 216px 文字侧栏改为 60px 图标轨:金色渐变 Logo、当前页金色指示条滑动、350ms 延迟悬停提示,底部连接/模型/设置/语言 - 顶栏:标题+副标题、项目范围胶囊(全部项目列表/最近项目)、Ctrl/⌘K 搜索、减少动态开关、任务托盘胶囊、本次连接胶囊(名称+延迟) - ≤760px:隐藏图标轨,底部 项目/创作/生成/更多 四个标签,更多为底部抽屉(其余页面、搜索、减少动态、语言);删除「手机端暂不适配」拦截 - 新增 ShellPop(Esc/↑↓/Tab 循环/外部点击关闭、焦点归还)与 CommandPalette(复用 Modal) - 减少动态:跟随系统设置,另可手动开启并持久化(data-reduce) - .a-darkroom 背景接入 --page-glow;新增壳层尺寸 token 与 .a-kbd/.a-menu-* 公共类 - 生图/生视频顶栏去掉与全局胶囊重复的连接状态(参数栏仍显示所选连接与队列) - 路由 URL 不变(/projects 仍重定向到项目总览 /) Co-authored-by: multica-agent <github@multica.ai> Co-authored-by: Cursor <cursoragent@cursor.com>
71 lines
2.3 KiB
TypeScript
71 lines
2.3 KiB
TypeScript
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),
|
|
);
|