feat: improve app ui and project metadata

This commit is contained in:
Yaojia Wang
2026-06-28 07:31:20 +02:00
parent 3bd464d400
commit 90a66437d7
86 changed files with 4892 additions and 1108 deletions

View File

@@ -8,8 +8,6 @@ import type { ActiveNav } from "./items";
export interface AiToolItem {
href: string;
label: string;
// 行首字形纸感非语义aria-hidden 渲染)。
glyph: string;
// 高亮键(与 AppShell activeNav 比对)。
key: ActiveNav;
// 主动作(写本章)朱砂强调,其余次级。
@@ -20,10 +18,18 @@ export interface AiToolItem {
export function aiToolItems(projectId: string): AiToolItem[] {
const base = `/projects/${projectId}`;
return [
{ href: `${base}/write`, label: "写本章", glyph: "✍", key: "write", primary: true },
{ href: `${base}/review`, label: "审稿", glyph: "✦", key: "review" },
{ href: `${base}/outline`, label: "大纲", glyph: "❡", key: "outline" },
{ href: `${base}/codex`, label: "设定库", glyph: "❖", key: "codex" },
{ href: `${base}/toolbox`, label: "工具箱", glyph: "✧", key: "toolbox" },
{ href: `${base}/write`, label: "写本章", key: "write", primary: true },
{ href: `${base}/review`, label: "审稿", key: "review" },
{ href: `${base}/outline`, label: "大纲", key: "outline" },
{ href: `${base}/codex`, label: "设定库", key: "codex" },
{ href: `${base}/toolbox`, label: "工具箱", key: "toolbox" },
];
}
export function primaryAiToolItems(projectId: string): AiToolItem[] {
return aiToolItems(projectId).slice(0, 2);
}
export function secondaryAiToolItems(projectId: string): AiToolItem[] {
return aiToolItems(projectId).slice(2);
}