feat: 支持证书托管和节点自动安装

This commit is contained in:
2026-09-29 13:06:56 +08:00
parent ab7d1c937a
commit 586c2399d1
20 changed files with 1600 additions and 20 deletions
+11 -3
View File
@@ -6,6 +6,7 @@ import {
Server,
Radio,
ScrollText,
ShieldCheck,
} from "lucide-react";
import Link from "next/link";
import { usePathname } from "next/navigation";
@@ -17,12 +18,19 @@ type NavItem = {
export function AdminNav({ items }: { items: NavItem[] }) {
const pathname = usePathname();
const icons = [LayoutDashboard, Users, Server, Radio, ScrollText];
const icons: Record<string, typeof Server> = {
"/admin/dashboard": LayoutDashboard,
"/admin/users": Users,
"/admin/nodes": Server,
"/admin/certificates": ShieldCheck,
"/admin/subscriptions": Radio,
"/admin/audits": ScrollText,
};
return (
<nav className="nav-list">
{items.map((item, index) => {
const Icon = icons[index];
{items.map((item) => {
const Icon = icons[item.href] ?? Server;
const active =
pathname === item.href || pathname.startsWith(`${item.href}/`);