feat: improve admin panel (#14180)

This commit is contained in:
DarkSky
2025-12-30 05:22:54 +08:00
committed by GitHub
parent d6b380aee5
commit 95a5e941e7
94 changed files with 3146 additions and 1114 deletions

View File

@@ -2,6 +2,7 @@ import { buttonVariants } from '@affine/admin/components/ui/button';
import { cn } from '@affine/admin/utils';
import { AccountIcon, SelfhostIcon } from '@blocksuite/icons/rc';
import { cssVarV2 } from '@toeverything/theme/v2';
import { LayoutDashboardIcon } from 'lucide-react';
import { NavLink } from 'react-router-dom';
import { ServerVersion } from './server-version';
@@ -80,7 +81,7 @@ export function Nav({ isCollapsed = false }: NavProps) {
>
<nav
className={cn(
'flex flex-1 flex-col gap-1 px-2 flex-grow overflow-hidden',
'flex flex-1 flex-col gap-1 px-2 flex-grow overflow-y-auto overflow-x-hidden',
isCollapsed && 'items-center px-0 gap-1 overflow-visible'
)}
>
@@ -90,6 +91,12 @@ export function Nav({ isCollapsed = false }: NavProps) {
label="Accounts"
isCollapsed={isCollapsed}
/>
<NavItem
to="/admin/workspaces"
icon={<LayoutDashboardIcon size={18} />}
label="Workspaces"
isCollapsed={isCollapsed}
/>
{/* <NavItem
to="/admin/ai"
icon={<AiOutlineIcon fontSize={20} />}