Files
xiaoxia-saas/apps/web/src/config/navigation.ts
T
xiaoxia 3862996045
CI/CD Pipeline / Production Browser E2E (push) Failing after 1312h43m40s
CI/CD Pipeline / Deploy Production (push) Failing after 1312h43m42s
CI/CD Pipeline / Build Production Worker Image (push) Failing after 1312h48m16s
CI/CD Pipeline / Build Production API Image (push) Failing after 1312h48m20s
CI/CD Pipeline / PR Build Worker Image (push) Failing after 1312h49m4s
CI/CD Pipeline / Check if frontend-only change (push) Failing after 1312h51m34s
CI/CD Pipeline / PR Build API Image (push) Failing after 1312h49m8s
CI/CD Pipeline / Build Staging API Image (push) Successful in 13m4s
CI/CD Pipeline / Build Staging Web Image (push) Successful in 2m5s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 4m56s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 58s
CI/CD Pipeline / Validate - Code Quality (push) Failing after 2m0s
CI/CD Pipeline / Validate - Type Check (mypy) (push) Successful in 1m5s
CI/CD Pipeline / Validate - Migration (alembic) (push) Successful in 1m12s
CI/CD Pipeline / Staging E2E Tests (push) Failing after 21s
CI/CD Pipeline / Unit Tests (push) Successful in 6m21s
CI/CD Pipeline / Integration Tests (push) Successful in 2m38s
CI/CD Pipeline / Frontend Lint (push) Successful in 46s
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 2m39s
CI/CD Pipeline / PR Build Web Image (push) Failing after 1313h21m29s
CI/CD Pipeline / Staging API Integration Tests (push) Successful in 4m40s
CI/CD Pipeline / Build Production Web Image (push) Failing after 1313h20m41s
CI/CD Pipeline / ACR Image Cleanup (push) Successful in 35s
refactor(#783): 统一API文件命名风格为kebab-case (#788)
2026-07-23 22:34:56 +08:00

219 lines
4.7 KiB
TypeScript

/**
* 统一导航配置
* Header.tsx 和 Sidebar.tsx 共享此数据源,避免路由配置重复
*/
import React from "react"
import {
DashboardOutlined,
FileOutlined,
FileTextOutlined,
AudioOutlined,
AppstoreOutlined,
EditOutlined,
FolderOutlined,
VideoCameraOutlined,
HistoryOutlined,
TrophyOutlined,
ScanOutlined,
ControlOutlined,
CrownOutlined,
UnorderedListOutlined,
} from "@ant-design/icons"
/** 导航项类型 */
export interface NavItem {
key: string
label: string
path: string
icon: React.ReactNode
}
/** 导航分组类型 */
export interface NavGroup {
title: string
items: NavItem[]
}
/**
* 全量导航项(Header 扁平列表使用)
* 所有路径统一使用 /app 前缀,与路由配置保持一致
*/
export const NAV_ITEMS: NavItem[] = [
{
key: "dashboard",
label: "概览",
path: "/app/dashboard",
icon: React.createElement(DashboardOutlined),
},
{
key: "assets",
label: "视频库",
path: "/app/assets",
icon: React.createElement(FileOutlined),
},
{
key: "titles",
label: "标题库",
path: "/app/titles",
icon: React.createElement(FileTextOutlined),
},
{
key: "voices",
label: "配音库",
path: "/app/voices",
icon: React.createElement(AudioOutlined),
},
{
key: "templates",
label: "模板库",
path: "/app/templates",
icon: React.createElement(AppstoreOutlined),
},
{
key: "editing-planner",
label: "剪辑编辑器",
path: "/app/editing-planner",
icon: React.createElement(EditOutlined),
},
{
key: "my-templates",
label: "我的模板",
path: "/app/my-templates",
icon: React.createElement(FolderOutlined),
},
{
key: "generate",
label: "智能剪辑",
path: "/app/generate",
icon: React.createElement(VideoCameraOutlined),
},
{
key: "history",
label: "任务历史",
path: "/app/history",
icon: React.createElement(HistoryOutlined),
},
{
key: "products",
label: "成品库",
path: "/app/products",
icon: React.createElement(TrophyOutlined),
},
{
key: "duplication",
label: "查重",
path: "/app/duplication",
icon: React.createElement(ScanOutlined),
},
{
key: "tasks",
label: "任务中心",
path: "/app/tasks",
icon: React.createElement(UnorderedListOutlined),
},
]
/** 侧边栏导航分组(Sidebar 分组列表使用) */
export const NAV_GROUPS: NavGroup[] = [
{
title: "创作工具",
items: [
{
key: "dashboard",
label: "概览",
path: "/app/dashboard",
icon: React.createElement(DashboardOutlined),
},
{
key: "generate",
label: "智能剪辑",
path: "/app/generate",
icon: React.createElement(VideoCameraOutlined),
},
{
key: "editing-planner",
label: "剪辑编辑器",
path: "/app/editing-planner",
icon: React.createElement(EditOutlined),
},
],
},
{
title: "资源管理",
items: [
{
key: "assets",
label: "视频库",
path: "/app/assets",
icon: React.createElement(FileOutlined),
},
{
key: "voices",
label: "配音库",
path: "/app/voices",
icon: React.createElement(AudioOutlined),
},
{
key: "titles",
label: "标题库",
path: "/app/titles",
icon: React.createElement(FileTextOutlined),
},
{
key: "products",
label: "成品库",
path: "/app/products",
icon: React.createElement(TrophyOutlined),
},
{
key: "templates",
label: "模板库",
path: "/app/templates",
icon: React.createElement(AppstoreOutlined),
},
{
key: "my-templates",
label: "我的模板",
path: "/app/my-templates",
icon: React.createElement(FolderOutlined),
},
],
},
{
title: "系统",
items: [
{
key: "history",
label: "任务历史",
path: "/app/history",
icon: React.createElement(HistoryOutlined),
},
{
key: "tasks",
label: "任务中心",
path: "/app/tasks",
icon: React.createElement(UnorderedListOutlined),
},
{
key: "duplication",
label: "查重",
path: "/app/duplication",
icon: React.createElement(ScanOutlined),
},
{
key: "admin",
label: "控制台",
path: "/app/admin",
icon: React.createElement(ControlOutlined),
},
{
key: "subscription",
label: "订阅管理",
path: "/app/subscription",
icon: React.createElement(CrownOutlined),
},
],
},
]