generated from kevisual/vite-react-template
feat: 更新Sidebar组件,优化外部链接处理;新增代码图像导航项
This commit is contained in:
1
.npmrc
1
.npmrc
@@ -1,3 +1,2 @@
|
||||
//npm.xiongxiao.me/:_authToken=${ME_NPM_TOKEN}
|
||||
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
|
||||
ignore-workspace-root-check=true
|
||||
@@ -82,7 +82,7 @@ export function Sidebar({
|
||||
|
||||
if (item.isDeveloping) {
|
||||
setDevelopingDialog({ open: true, title: item.title })
|
||||
} else if (item.external && item.path.startsWith('http')) {
|
||||
} else if (item.external) {
|
||||
window.open(item.path, '_blank')
|
||||
} else if (item.path.startsWith('/')) {
|
||||
navigate({ to: item.path })
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { FolderKanban, LayoutDashboard, Settings, PlayCircle, Cloud, Package } from 'lucide-react'
|
||||
import { FolderKanban, LayoutDashboard, Settings, PlayCircle, Cloud, Package ,Grape} from 'lucide-react'
|
||||
import { Sidebar, type NavItem } from '@/components/a/Sidebar'
|
||||
import { Logo } from './CNBBlackLogo.tsx'
|
||||
|
||||
@@ -23,7 +23,12 @@ const navItems: NavItem[] = [
|
||||
path: '/cnb-packages',
|
||||
icon: <Package className="w-5 h-5" />,
|
||||
},
|
||||
|
||||
{
|
||||
title: '代码图像',
|
||||
path: '/root/code-graph',
|
||||
icon: <Grape className="w-5 h-5" />,
|
||||
external: true,
|
||||
},
|
||||
{
|
||||
title: '其他',
|
||||
path: '/other',
|
||||
|
||||
Reference in New Issue
Block a user