feat(points): update apps/web/src/config/navigation.ts

This commit is contained in:
2026-09-15 08:38:13 +08:00
parent 2930c18ca6
commit eceb8217e6
+49 -1
View File
@@ -1,6 +1,7 @@
/**
* 统一导航配置
* Header.tsx 和 Sidebar.tsx 共享此数据源,避免路由配置重复
* v2: 增加积分中心 / 会员订阅入口(侧边栏)
*/
import React from "react"
import {
@@ -8,7 +9,9 @@ import {
FileOutlined,
FileTextOutlined,
AudioOutlined,
AppstoreOutlined,
EditOutlined,
FolderOutlined,
VideoCameraOutlined,
HistoryOutlined,
TrophyOutlined,
@@ -17,6 +20,7 @@ import {
CrownOutlined,
UnorderedListOutlined,
UserOutlined,
DiamondOutlined,
} from "@ant-design/icons"
/** 导航项类型 */
@@ -36,6 +40,7 @@ export interface NavGroup {
/**
* 全量导航项(Header 扁平列表使用)
* 所有路径统一使用 /app 前缀,与路由配置保持一致
* 注:积分/会员入口放在 Header 右侧按钮区(升级会员+积分徽章),不占用主导航槽位
*/
export const NAV_ITEMS: NavItem[] = [
{
@@ -68,6 +73,24 @@ export const NAV_ITEMS: NavItem[] = [
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",
@@ -130,6 +153,12 @@ export const NAV_GROUPS: NavGroup[] = [
path: "/app/ai-avatar",
icon: React.createElement(UserOutlined),
},
{
key: "editing-planner",
label: "剪辑模板",
path: "/app/editing-planner",
icon: React.createElement(EditOutlined),
},
],
},
{
@@ -165,6 +194,18 @@ export const NAV_GROUPS: NavGroup[] = [
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),
},
],
},
{
@@ -194,12 +235,19 @@ export const NAV_GROUPS: NavGroup[] = [
path: "/app/admin",
icon: React.createElement(ControlOutlined),
},
// v2: 会员与积分
{
key: "subscription",
label: "订阅管理",
label: "会员订阅",
path: "/app/subscription",
icon: React.createElement(CrownOutlined),
},
{
key: "points",
label: "积分中心",
path: "/app/points",
icon: React.createElement(DiamondOutlined),
},
],
},
]