feat: 我的资源分组新增周易议事外链菜单(连接bz9ai.top)
CI / 后端测试 (push) Has been cancelled
CI / 前端构建 (push) Has been cancelled

This commit is contained in:
selfrelease
2026-09-01 10:25:46 +08:00
parent 02e1babdc4
commit 835c095403
2 changed files with 33 additions and 17 deletions
+29 -16
View File
@@ -27,22 +27,35 @@ export function Sidebar() {
<div key={group} className="mb-4">
<div className="px-5 py-1 text-xs font-medium text-muted-foreground">{group}</div>
{items.map((item) => (
<NavLink
key={item.path}
to={item.path}
end
className={({ isActive }) =>
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.icon className="h-4 w-4 shrink-0" />
<span>{item.label}</span>
</NavLink>
item.external ? (
<a
key={item.path}
href={item.path}
target="_blank"
rel="noopener noreferrer"
className="flex items-center gap-3 px-5 py-2 text-sm text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"
>
<item.icon className="h-4 w-4 shrink-0" />
<span>{item.label}</span>
</a>
) : (
<NavLink
key={item.path}
to={item.path}
end
className={({ isActive }) =>
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.icon className="h-4 w-4 shrink-0" />
<span>{item.label}</span>
</NavLink>
)
))}
</div>
))}
+4 -1
View File
@@ -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: '系统' },
]