/** Admin 端布局 — 警示风格:slate-950 Header + amber 主色 + 6 管理域 Sidebar。 */ "use client"; import Link from "next/link"; import { usePathname } from "next/navigation"; import { Building2, Users, ScrollText, Database, ShieldCheck, Settings, } from "lucide-react"; /** Admin 6 管理域导航。 */ const adminNav = [ { title: "租户管理", items: [ { href: "/admin", label: "系统概览", icon: Building2 }, { href: "/admin/tenants", label: "租户列表", icon: Building2 }, ], }, { title: "用户管理", items: [ { href: "/admin/users", label: "用户列表", icon: Users }, ], }, { title: "审计日志", items: [ { href: "/admin/audit", label: "操作日志", icon: ScrollText }, ], }, { title: "数据源", items: [ { href: "/admin/data-sources", label: "数据源管理", icon: Database }, ], }, { title: "安全配置", items: [ { href: "/admin/security", label: "商业秘密保护", icon: ShieldCheck }, ], }, { title: "系统设置", items: [ { href: "/admin/settings", label: "系统参数", icon: Settings }, ], }, ]; /** * Admin 端布局组件。 * * 左侧 Sidebar 按 6 管理域分组,Header 使用 slate-950 + amber 警示色。 */ export default function AdminLayout({ children }: { children: React.ReactNode }) { const pathname = usePathname(); return (