From 835c095403953f2146aeae5d23a2835e67b250f2 Mon Sep 17 00:00:00 2001 From: selfrelease Date: Tue, 1 Sep 2026 10:25:46 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=88=91=E7=9A=84=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E5=88=86=E7=BB=84=E6=96=B0=E5=A2=9E=E5=91=A8=E6=98=93=E8=AE=AE?= =?UTF-8?q?=E4=BA=8B=E5=A4=96=E9=93=BE=E8=8F=9C=E5=8D=95(=E8=BF=9E?= =?UTF-8?q?=E6=8E=A5bz9ai.top)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web2/src/components/layout/Sidebar.tsx | 45 +++++++++++++++++--------- web2/src/lib/nav-config.ts | 5 ++- 2 files changed, 33 insertions(+), 17 deletions(-) diff --git a/web2/src/components/layout/Sidebar.tsx b/web2/src/components/layout/Sidebar.tsx index 8fc450c..e830f9f 100644 --- a/web2/src/components/layout/Sidebar.tsx +++ b/web2/src/components/layout/Sidebar.tsx @@ -27,22 +27,35 @@ export function Sidebar() {
{group}
{items.map((item) => ( - - cn( - 'flex items-center gap-3 px-5 py-2 text-sm transition-colors', - isActive - ? 'bg-primary/10 text-primary font-medium border-r-2 border-primary' - : 'text-muted-foreground hover:bg-muted hover:text-foreground', - ) - } - > - - {item.label} - + item.external ? ( + + + {item.label} + + ) : ( + + cn( + 'flex items-center gap-3 px-5 py-2 text-sm transition-colors', + isActive + ? 'bg-primary/10 text-primary font-medium border-r-2 border-primary' + : 'text-muted-foreground hover:bg-muted hover:text-foreground', + ) + } + > + + {item.label} + + ) ))}
))} diff --git a/web2/src/lib/nav-config.ts b/web2/src/lib/nav-config.ts index e65197d..20b5dcf 100644 --- a/web2/src/lib/nav-config.ts +++ b/web2/src/lib/nav-config.ts @@ -7,7 +7,7 @@ import type { ComponentType } from 'react' import { LayoutDashboard, ClipboardList, Scale, TrendingUp, Heart, Users, BookOpen, History, User, Settings, ShieldCheck, FileText, - BarChart3, Cpu, MessageSquare, UserCog, Briefcase, Sparkles, + BarChart3, Cpu, MessageSquare, UserCog, Briefcase, Sparkles, Compass, } from 'lucide-react' export interface NavItem { @@ -23,6 +23,8 @@ export interface NavItem { tab?: boolean /** 底部 Tab 显示标签(不填则用 label) */ tabLabel?: string + /** 外部链接(新窗口打开,不走路由) */ + external?: boolean } /** 用户端导航(老板) */ @@ -43,6 +45,7 @@ export const USER_NAV: NavItem[] = [ { path: '/knowledge', label: '知识库', icon: BookOpen, group: '我的资源' }, { path: '/history', label: '对话历史', icon: History, group: '我的资源' }, { path: '/profile', label: '我的画像', icon: User, group: '我的资源' }, + { path: 'https://bz9ai.top', label: '周易议事', icon: Compass, group: '我的资源', external: true }, // 系统 { path: '/settings', label: '设置', icon: Settings, group: '系统' }, ]