feat: 添加可折叠侧边栏布局,优化仓库列表和工作空间页面

This commit is contained in:
xiongxiao
2026-03-19 20:26:27 +08:00
committed by cnb
parent 9a06364880
commit dd6eff9269
13 changed files with 568 additions and 236 deletions

View File

@@ -0,0 +1,35 @@
import { FolderKanban, LayoutDashboard, Settings, PlayCircle } from 'lucide-react'
import { Sidebar, type NavItem } from '@/components/a/Sidebar'
import { Logo } from './CNBBlackLogo.tsx'
const navItems: NavItem[] = [
{
title: '仓库管理',
path: '/',
icon: <FolderKanban className="w-5 h-5" />,
},
{
title: '工作空间',
path: '/workspaces',
icon: <LayoutDashboard className="w-5 h-5" />,
},
{
title: '应用配置',
path: '/config',
icon: <Settings className="w-5 h-5" />,
},
{
title: '其他',
path: '/demo',
icon: <PlayCircle className="w-5 h-5" />,
isDeveloping: true,
},
]
export function SidebarLayout({ children }: { children: React.ReactNode }) {
return (
<Sidebar items={navItems} title='云原生' logo={<Logo className='w-6 h-6' />}>
{children}
</Sidebar>
)
}