feat: 我的资源分组新增周易议事外链菜单(连接bz9ai.top)
This commit is contained in:
@@ -27,6 +27,18 @@ 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) => (
|
||||
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}
|
||||
@@ -43,6 +55,7 @@ export function Sidebar() {
|
||||
<item.icon className="h-4 w-4 shrink-0" />
|
||||
<span>{item.label}</span>
|
||||
</NavLink>
|
||||
)
|
||||
))}
|
||||
</div>
|
||||
))}
|
||||
|
||||
@@ -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: '系统' },
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user