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:
1 parent
fa4516b078
commit
81c5e4e2fd
24 files changed
+1238
-595
No files matched your search
@@ -1,29 +1,38 @@
|
||||
import { cn } from '@/lib/utils';
|
||||
import Link from 'next/link';
|
||||
import React from 'react';
|
||||
|
||||
interface AdminPageHeaderProps {
|
||||
title: string;
|
||||
actions?: React.ReactNode;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export function AdminPageHeader({ title, actions }: AdminPageHeaderProps) {
|
||||
export function AdminPageHeader({ title, actions, className }: AdminPageHeaderProps) {
|
||||
return (
|
||||
<header className="mb-3 flex min-h-8 flex-wrap items-center justify-between gap-2 border-b border-[var(--border)] pb-2.5">
|
||||
<div className="flex min-w-0 items-center gap-1.5">
|
||||
<Link
|
||||
href="/vcon/dashboard"
|
||||
className="text-[11.5px] text-[var(--text-faint)] hover:text-[var(--text-muted)]"
|
||||
>
|
||||
Console
|
||||
</Link>
|
||||
<span className="text-[11px] text-[var(--border-strong)]" aria-hidden="true">
|
||||
/
|
||||
</span>
|
||||
<h1 className="truncate text-[13.5px] font-medium tracking-tight text-[var(--text)]">
|
||||
{title}
|
||||
</h1>
|
||||
<header
|
||||
className={cn(
|
||||
'-mx-3.5 mb-3 flex h-10 shrink-0 items-center border-b border-[var(--border)] bg-[var(--surface)] px-3.5 sm:-mx-5 sm:px-5',
|
||||
className
|
||||
)}
|
||||
>
|
||||
<div className="flex w-full max-w-[var(--console-width)] min-w-0 items-center justify-between gap-2">
|
||||
<div className="flex min-w-0 items-center gap-1.5">
|
||||
<Link
|
||||
href="/vcon/dashboard"
|
||||
className="text-[11.5px] text-[var(--text-faint)] hover:text-[var(--text-muted)]"
|
||||
>
|
||||
Console
|
||||
</Link>
|
||||
<span className="text-[11px] text-[var(--border-strong)]" aria-hidden="true">
|
||||
/
|
||||
</span>
|
||||
<h1 className="truncate text-[13px] font-medium tracking-tight text-[var(--text)]">
|
||||
{title}
|
||||
</h1>
|
||||
</div>
|
||||
{actions && <div className="flex shrink-0 items-center gap-1.5">{actions}</div>}
|
||||
</div>
|
||||
{actions && <div className="flex items-center gap-1.5">{actions}</div>}
|
||||
</header>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user