refactor(panel): uniform margins

This commit is contained in:
Lemon-miaow committed 2026-06-27 20:59:58 +08:00
1 parent 9d1378793e
commit f3521e3712
10 files changed
+20 -18

No files matched your search

+2
View File
@@ -122,7 +122,9 @@ export function AppShell() {
</div> </div>
</header> </header>
<main className="flex-1 p-6"> <main className="flex-1 p-6">
<div className="mx-auto max-w-7xl space-y-7">
<Outlet /> <Outlet />
</div>
</main> </main>
</div> </div>
</div> </div>
+2 -2
View File
@@ -67,7 +67,7 @@ export function Account() {
} }
return ( return (
<div className="mx-auto max-w-4xl space-y-6"> <>
<div> <div>
<h1 className="text-2xl font-semibold tracking-tight">{t("title")}</h1> <h1 className="text-2xl font-semibold tracking-tight">{t("title")}</h1>
<p className="text-sm text-muted-foreground"> <p className="text-sm text-muted-foreground">
@@ -119,7 +119,7 @@ export function Account() {
)} )}
</CardContent> </CardContent>
</Card> </Card>
</div> </>
); );
} }
+2 -2
View File
@@ -81,7 +81,7 @@ export function Dashboard() {
const error = serversErr || linkErr || meErr; const error = serversErr || linkErr || meErr;
return ( return (
<div className="mx-auto max-w-6xl space-y-6"> <>
<div> <div>
<h1 className="text-2xl font-semibold tracking-tight">{t("title")}</h1> <h1 className="text-2xl font-semibold tracking-tight">{t("title")}</h1>
<p className="text-sm text-muted-foreground">{t("subtitle")}</p> <p className="text-sm text-muted-foreground">{t("subtitle")}</p>
@@ -102,7 +102,7 @@ export function Dashboard() {
isAdmin={!!identity?.is_admin} isAdmin={!!identity?.is_admin}
/> />
)} )}
</div> </>
); );
} }
+2 -2
View File
@@ -15,7 +15,7 @@ export function MyServers() {
const servers = data ?? []; const servers = data ?? [];
return ( return (
<div className="mx-auto max-w-6xl space-y-6"> <>
<div> <div>
<h1 className="text-2xl font-semibold tracking-tight">{t("my_servers_title")}</h1> <h1 className="text-2xl font-semibold tracking-tight">{t("my_servers_title")}</h1>
<p className="text-sm text-muted-foreground"> <p className="text-sm text-muted-foreground">
@@ -47,6 +47,6 @@ export function MyServers() {
{t("my_servers_footer")} {t("my_servers_footer")}
</CardContent> </CardContent>
</Card> </Card>
</div> </>
); );
} }
+2 -2
View File
@@ -76,7 +76,7 @@ export function ServerConsole() {
const streamable = data?.phase === "Running" || data?.phase === "Starting"; const streamable = data?.phase === "Running" || data?.phase === "Starting";
return ( return (
<div className="mx-auto max-w-4xl space-y-6"> <>
<Link <Link
to="/servers" to="/servers"
className="inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground" className="inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground"
@@ -143,6 +143,6 @@ export function ServerConsole() {
</Card> </Card>
</> </>
) : null} ) : null}
</div> </>
); );
} }
+2 -2
View File
@@ -28,7 +28,7 @@ export function AdminHome() {
]; ];
return ( return (
<div className="mx-auto max-w-4xl space-y-6"> <>
<div className="flex items-center gap-3"> <div className="flex items-center gap-3">
<ShieldCheck className="h-6 w-6 text-primary" /> <ShieldCheck className="h-6 w-6 text-primary" />
<div> <div>
@@ -61,6 +61,6 @@ export function AdminHome() {
{t("footer_post")} {t("footer_post")}
</CardContent> </CardContent>
</Card> </Card>
</div> </>
); );
} }
+2 -2
View File
@@ -17,7 +17,7 @@ export function ImageAdmin() {
const images = data ?? []; const images = data ?? [];
return ( return (
<div className="mx-auto max-w-4xl space-y-6"> <>
<div> <div>
<h1 className="text-2xl font-semibold tracking-tight">{t("images_title")}</h1> <h1 className="text-2xl font-semibold tracking-tight">{t("images_title")}</h1>
<p className="text-sm text-muted-foreground"> <p className="text-sm text-muted-foreground">
@@ -62,6 +62,6 @@ export function ImageAdmin() {
))} ))}
</div> </div>
)} )}
</div> </>
); );
} }
+2 -2
View File
@@ -23,7 +23,7 @@ export function ServerAdmin() {
const servers = data ?? []; const servers = data ?? [];
return ( return (
<div className="mx-auto max-w-6xl space-y-6"> <>
<div className="flex items-center justify-between gap-4"> <div className="flex items-center justify-between gap-4">
<div> <div>
<h1 className="text-2xl font-semibold tracking-tight">{t("servers")}</h1> <h1 className="text-2xl font-semibold tracking-tight">{t("servers")}</h1>
@@ -58,6 +58,6 @@ export function ServerAdmin() {
{ts("server_admin_footer")} {ts("server_admin_footer")}
</CardContent> </CardContent>
</Card> </Card>
</div> </>
); );
} }
+2 -2
View File
@@ -9,7 +9,7 @@ import { PendingBackend } from "@/components/States";
export function FleetTable() { export function FleetTable() {
const { t } = useTranslation("ops"); const { t } = useTranslation("ops");
return ( return (
<div className="mx-auto max-w-5xl space-y-6"> <>
<div className="flex items-center gap-3"> <div className="flex items-center gap-3">
<Network className="h-6 w-6 text-primary" /> <Network className="h-6 w-6 text-primary" />
<div> <div>
@@ -24,6 +24,6 @@ export function FleetTable() {
endpoint="GET /api/v1/admin/servers" endpoint="GET /api/v1/admin/servers"
note={t("fleet_table_pending_note")} note={t("fleet_table_pending_note")}
/> />
</div> </>
); );
} }
+2 -2
View File
@@ -14,7 +14,7 @@ import { PendingBackend } from "@/components/States";
export function OpsOverview() { export function OpsOverview() {
const { t } = useTranslation("ops"); const { t } = useTranslation("ops");
return ( return (
<div className="mx-auto max-w-4xl space-y-6"> <>
<div className="flex items-center gap-3"> <div className="flex items-center gap-3">
<Gauge className="h-6 w-6 text-primary" /> <Gauge className="h-6 w-6 text-primary" />
<div> <div>
@@ -53,6 +53,6 @@ export function OpsOverview() {
</span> </span>
</CardContent> </CardContent>
</Card> </Card>
</div> </>
); );
} }