项目页签表从 zustand 切片移入 app/layout/nav.ts:导航是静态表不是状态
parent
816cdc25b7
commit
e677d891d4
|
|
@ -11,7 +11,7 @@
|
|||
import type { ReactNode } from 'react'
|
||||
import { NavLink, useLocation } from 'react-router-dom'
|
||||
import { cn } from '../../lib/cn'
|
||||
import { modules } from '../../stores/system'
|
||||
import { modules } from './nav'
|
||||
import { useCurrentStageNote } from './PipelineConsole'
|
||||
|
||||
const NAV_ITEM = cn(
|
||||
|
|
|
|||
|
|
@ -0,0 +1,17 @@
|
|||
/**
|
||||
* 侧栏导航表(唯一的两处之一:全局三项在 SideNav 里直接写死,项目七页签在这里)。
|
||||
*
|
||||
* 为什么不在 zustand store 里:这张表和 health/models 一样,历史上寄居在
|
||||
* `stores/system.ts`,但它既不是状态也不可变——放进 store 只会让人误以为
|
||||
* 有「切换项目模块」的订阅逻辑。加一个项目页签 = 这里加一行 + `app/router.tsx`
|
||||
* 加一条子路由(含 `handle` 标题),两边顺序保持一致即可,别按字母排。
|
||||
*/
|
||||
export const modules: { to: (id: number | string) => string; icon: string; label: string; hint: string }[] = [
|
||||
{ to: (id) => `/projects/${id}/overview`, icon: '◎', label: '流程概览', hint: '总控台 / 全节点进度' },
|
||||
{ to: (id) => `/projects/${id}/library`, icon: '☺', label: '资产管理', hint: '人物 / 声音 / 场景' },
|
||||
{ to: (id) => `/projects/${id}/storyboard`, icon: '▤', label: '分镜与脚本', hint: '镜头 / 关键帧 / 提示词' },
|
||||
{ to: (id) => `/projects/${id}/dispatch`, icon: '⇶', label: '任务调度中心', hint: '队列 / 执行 / 重试 / 并发' },
|
||||
{ to: (id) => `/projects/${id}/review`, icon: '✓', label: '质检与审核', hint: '质检 + 人工审核' },
|
||||
{ to: (id) => `/projects/${id}/timeline`, icon: '≡', label: '时间线合成', hint: '片段 / 配音 / 字幕' },
|
||||
{ to: (id) => `/projects/${id}/delivery`, icon: '⇩', label: '导出与成本', hint: '成片 / 成本台账' }
|
||||
]
|
||||
|
|
@ -70,14 +70,3 @@ export const presetLabel: Record<string, string> = {
|
|||
hq_1080p: '高质量 1080p',
|
||||
uhd_4k: '超清 4K'
|
||||
}
|
||||
|
||||
/** 项目详情的七个页签 = 侧栏项目分组(顺序即业务流程顺序,别按字母排) */
|
||||
export const modules: { to: (id: number | string) => string; icon: string; label: string; hint: string }[] = [
|
||||
{ to: (id) => `/projects/${id}/overview`, icon: '◎', label: '流程概览', hint: '总控台 / 全节点进度' },
|
||||
{ to: (id) => `/projects/${id}/library`, icon: '☺', label: '资产管理', hint: '人物 / 声音 / 场景' },
|
||||
{ to: (id) => `/projects/${id}/storyboard`, icon: '▤', label: '分镜与脚本', hint: '镜头 / 关键帧 / 提示词' },
|
||||
{ to: (id) => `/projects/${id}/dispatch`, icon: '⇶', label: '任务调度中心', hint: '队列 / 执行 / 重试 / 并发' },
|
||||
{ to: (id) => `/projects/${id}/review`, icon: '✓', label: '质检与审核', hint: '质检 + 人工审核' },
|
||||
{ to: (id) => `/projects/${id}/timeline`, icon: '≡', label: '时间线合成', hint: '片段 / 配音 / 字幕' },
|
||||
{ to: (id) => `/projects/${id}/delivery`, icon: '⇩', label: '导出与成本', hint: '成片 / 成本台账' }
|
||||
]
|
||||
|
|
|
|||
Loading…
Reference in New Issue