refactor: replace AdminPageHeader with PageShell

Migrate pages to PageShell, add global autofill styles, and update SDK/simulator page logic for server URL and state consistency.
This commit is contained in:
Team Dark Devil committed 2026-11-17 00:24:33 +06:00
1 parent fa4516b078
commit 81c5e4e2fd
24 files changed
+1238 -595

No files matched your search

+13 -7
View File
@@ -1,3 +1,4 @@
import { cn } from '@/lib/utils';
import type { ReactNode } from 'react';
type Dot = 'ok' | 'off' | 'pending';
@@ -9,17 +10,22 @@ const DOT_CLASS: Record<Dot, string> = {
pending: 'bg-[var(--warning)]',
};
export function StatStrip({ items }: { items: Item[] }) {
export function StatStrip({ items, className }: { items: Item[]; className?: string }) {
return (
<div className="mb-3 grid grid-cols-2 gap-px border border-[var(--border)] bg-[var(--border)] md:grid-cols-4">
<div
className={cn(
'stat-strip mb-3 grid w-full grid-cols-2 gap-px border border-[var(--border)] bg-[var(--border)] md:grid-cols-4',
className
)}
>
{items.map((item) => (
<div key={item.label} className="bg-[var(--surface)] px-3 py-2">
<div className="mb-0.5 text-[9.5px] uppercase tracking-wider text-[var(--text-faint)]">
<div key={item.label} className="min-w-0 bg-[var(--surface)] px-3 py-2">
<div className="mb-0.5 truncate text-[9.5px] uppercase tracking-wider text-[var(--text-faint)]">
{item.label}
</div>
<div className="flex items-center gap-1.5 font-mono text-[15px] font-medium leading-tight tracking-tight tabular-nums text-[var(--text)]">
{item.dot && <span aria-hidden="true" className={`h-1.5 w-1.5 ${DOT_CLASS[item.dot]}`} />}
{item.value}
<div className="flex min-w-0 items-center gap-1.5 font-mono text-[15px] font-medium leading-tight tracking-tight tabular-nums text-[var(--text)]">
{item.dot && <span aria-hidden="true" className={`h-1.5 w-1.5 shrink-0 ${DOT_CLASS[item.dot]}`} />}
<span className="truncate">{item.value}</span>
</div>
</div>
))}