From 09fc1995252107dde975b202ddb95f1313b07e10 Mon Sep 17 00:00:00 2001 From: xiongxiao Date: Tue, 24 Mar 2026 02:28:56 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0Sidebar=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=EF=BC=8C=E4=BC=98=E5=8C=96=E5=A4=96=E9=83=A8=E9=93=BE?= =?UTF-8?q?=E6=8E=A5=E5=A4=84=E7=90=86=EF=BC=9B=E6=96=B0=E5=A2=9E=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E5=9B=BE=E5=83=8F=E5=AF=BC=E8=88=AA=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .npmrc | 1 - src/components/a/Sidebar.tsx | 2 +- src/pages/sidebar/components/Sidebar.tsx | 9 +++++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.npmrc b/.npmrc index 0a2c6cd..aa8bc54 100644 --- a/.npmrc +++ b/.npmrc @@ -1,3 +1,2 @@ -//npm.xiongxiao.me/:_authToken=${ME_NPM_TOKEN} //registry.npmjs.org/:_authToken=${NPM_TOKEN} ignore-workspace-root-check=true \ No newline at end of file diff --git a/src/components/a/Sidebar.tsx b/src/components/a/Sidebar.tsx index b395b4c..b9715ef 100644 --- a/src/components/a/Sidebar.tsx +++ b/src/components/a/Sidebar.tsx @@ -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 }) diff --git a/src/pages/sidebar/components/Sidebar.tsx b/src/pages/sidebar/components/Sidebar.tsx index 7b26fc4..430646b 100644 --- a/src/pages/sidebar/components/Sidebar.tsx +++ b/src/pages/sidebar/components/Sidebar.tsx @@ -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: , }, - + { + title: '代码图像', + path: '/root/code-graph', + icon: , + external: true, + }, { title: '其他', path: '/other',