polish: redesign node admin UI

This commit is contained in:
JetSprow
2026-04-30 22:09:21 +10:00
parent c5592621a4
commit 157f3841f6
13 changed files with 399 additions and 195 deletions

View File

@@ -1,20 +1,22 @@
"use client";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
import { StatusBadge } from "@/components/shared/status-badge";
import type { NodeDetail } from "../node-detail-data";
import { InboundsTab } from "./tabs/inbounds-tab";
export function NodeDetailTabs({ node }: { node: NodeDetail }) {
return (
<Tabs defaultValue="inbounds">
<TabsList variant="line" className="w-full overflow-x-auto">
<TabsTrigger value="inbounds">
3x-ui ({node.inbounds.length})
</TabsTrigger>
</TabsList>
<TabsContent value="inbounds">
<InboundsTab node={node} />
</TabsContent>
</Tabs>
<section className="space-y-4">
<div className="flex flex-wrap items-center justify-between gap-3">
<div>
<p className="text-xs font-medium tracking-wide text-muted-foreground">线</p>
<h2 className="text-lg font-semibold tracking-tight">3x-ui </h2>
</div>
<StatusBadge tone={node.inbounds.length > 0 ? "info" : "neutral"}>
{node.inbounds.length}
</StatusBadge>
</div>
<InboundsTab node={node} />
</section>
);
}