mirror of
https://github.com/hansjone/netx.git
synced 2026-10-15 01:00:53 +08:00
Redesign the shell and console with a liquid-glass look.
- Title bar: floating glass capsule aligned to each page's content edge, new NETX mark (links-as-X), task badge, user menu with sign-out, globe locale. - Console: resource strip on top, module launcher as the main area with fixed-size tiles that fill rows as modules are added, task rail sized to the left column; dropped health pill, refresh button and filler copy. - Glass layer (theme/glass.css, loaded last): black-blue wallpaper with a faint dot grid, clear panels with specular rims, translucent controls and table headers; sidebar pages float their nav and work area on a 16px gutter. - Removed ~280 lines of duplicated header CSS from primitives/theme. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
0ecff329cf
commit
8ecbb13f52
15 changed files with 1035 additions and 895 deletions
|
|
@ -1,16 +1,16 @@
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="none" role="img" aria-label="NETX">
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" role="img" aria-label="NETX">
|
||||||
<rect width="32" height="32" rx="8" fill="#0F2744"/>
|
<defs>
|
||||||
<!-- Stylized N from linked nodes: network ops mark -->
|
<linearGradient id="g" x1="0" y1="0" x2="24" y2="24" gradientUnits="userSpaceOnUse">
|
||||||
<path
|
<stop offset="0" stop-color="#3b82f6"/>
|
||||||
d="M9.5 8.5v15M9.5 8.5 22.5 23.5M22.5 8.5v15"
|
<stop offset="1" stop-color="#1d4ed8"/>
|
||||||
stroke="#7EB6E8"
|
</linearGradient>
|
||||||
stroke-width="2.2"
|
</defs>
|
||||||
stroke-linecap="round"
|
<!-- NETX mark: an "X" of links, four nodes around a hub; one node lit as "live". -->
|
||||||
stroke-linejoin="round"
|
<rect width="24" height="24" rx="6.5" fill="url(#g)"/>
|
||||||
/>
|
<path d="M7 7l10 10M17 7 7 17" stroke="#fff" stroke-opacity=".55" stroke-width="1.6" stroke-linecap="round"/>
|
||||||
<circle cx="9.5" cy="8.5" r="2.35" fill="#E8F2FC"/>
|
<circle cx="12" cy="12" r="2.6" fill="#fff"/>
|
||||||
<circle cx="9.5" cy="23.5" r="2.35" fill="#E8F2FC"/>
|
<circle cx="7" cy="7" r="1.9" fill="#fff"/>
|
||||||
<circle cx="22.5" cy="8.5" r="2.35" fill="#E8F2FC"/>
|
<circle cx="7" cy="17" r="1.9" fill="#fff"/>
|
||||||
<circle cx="22.5" cy="23.5" r="2.35" fill="#E8F2FC"/>
|
<circle cx="17" cy="17" r="1.9" fill="#fff"/>
|
||||||
<circle cx="16" cy="16" r="1.7" fill="#3D82F7"/>
|
<circle cx="17" cy="7" r="2.1" fill="#67e8f9"/>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 655 B After Width: | Height: | Size: 815 B |
|
|
@ -48,11 +48,11 @@ const FLEET_TONE_COLOR: Record<"ok" | "mid" | "warn" | "bad" | "muted", string>
|
||||||
const REGION_PALETTE = [
|
const REGION_PALETTE = [
|
||||||
"#38bdf8",
|
"#38bdf8",
|
||||||
"#22d3ee",
|
"#22d3ee",
|
||||||
"#818cf8",
|
"#60a5fa",
|
||||||
"#34d399",
|
"#34d399",
|
||||||
"#fbbf24",
|
"#fbbf24",
|
||||||
"#fb7185",
|
"#fb7185",
|
||||||
"#a78bfa",
|
"#93c5fd",
|
||||||
"#2dd4bf",
|
"#2dd4bf",
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -109,10 +109,10 @@ function FleetDonut({
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className="wb-fleet__donut"
|
className="wb-fleet__donut"
|
||||||
style={{ background: buildDonutGradient(parts) }}
|
|
||||||
role="img"
|
role="img"
|
||||||
aria-label={`${center} ${unit ?? ""}`.trim()}
|
aria-label={`${center} ${unit ?? ""}`.trim()}
|
||||||
>
|
>
|
||||||
|
<div className="wb-fleet__donut-ring" style={{ background: buildDonutGradient(parts) }} />
|
||||||
<div className="wb-fleet__donut-hole">
|
<div className="wb-fleet__donut-hole">
|
||||||
<div className="wb-fleet__donut-value">{center}</div>
|
<div className="wb-fleet__donut-value">{center}</div>
|
||||||
{unit ? <div className="wb-fleet__donut-unit">{unit}</div> : null}
|
{unit ? <div className="wb-fleet__donut-unit">{unit}</div> : null}
|
||||||
|
|
@ -373,17 +373,13 @@ export function WorkbenchPage() {
|
||||||
const webMax = Math.max(1, Number(metrics?.webcrt?.max_sessions || 20));
|
const webMax = Math.max(1, Number(metrics?.webcrt?.max_sessions || 20));
|
||||||
const webPct = ratioPct(webUsed, webMax);
|
const webPct = ratioPct(webUsed, webMax);
|
||||||
|
|
||||||
const hostBusy = cpuPct >= 75 || memPct >= 75;
|
|
||||||
const platformBusy = cliPct >= 75 || dbPct >= 75 || webPct >= 75;
|
|
||||||
const schedulers = metrics?.device_schedulers;
|
const schedulers = metrics?.device_schedulers;
|
||||||
const schedConfigOn = Boolean(schedulers?.config_sync?.running ?? metrics?.config_sync?.running);
|
const schedConfigOn = Boolean(schedulers?.config_sync?.running ?? metrics?.config_sync?.running);
|
||||||
const schedLldpOn = Boolean(schedulers?.lldp_collect?.running ?? metrics?.lldp_collect?.running);
|
const schedLldpOn = Boolean(schedulers?.lldp_collect?.running ?? metrics?.lldp_collect?.running);
|
||||||
const schedPortOn = Boolean(schedulers?.port_traffic?.running ?? metrics?.port_traffic?.running);
|
const schedPortOn = Boolean(schedulers?.port_traffic?.running ?? metrics?.port_traffic?.running);
|
||||||
const schedNeOn = Boolean(schedulers?.ne_collect?.running);
|
const schedNeOn = Boolean(schedulers?.ne_collect?.running);
|
||||||
const schedStale = Boolean(schedulers?.stale);
|
const schedStale = Boolean(schedulers?.stale);
|
||||||
const schedMode = String(schedulers?.mode || "");
|
|
||||||
const schedAge = typeof schedulers?.age_sec === "number" ? schedulers.age_sec : null;
|
const schedAge = typeof schedulers?.age_sec === "number" ? schedulers.age_sec : null;
|
||||||
const healthBusy = hostBusy || platformBusy || schedStale;
|
|
||||||
const canReadFleet = isAdmin || hasScope("ne:read");
|
const canReadFleet = isAdmin || hasScope("ne:read");
|
||||||
|
|
||||||
const neTotal = neStatsQuery.data?.total ?? 0;
|
const neTotal = neStatsQuery.data?.total ?? 0;
|
||||||
|
|
@ -392,13 +388,6 @@ export function WorkbenchPage() {
|
||||||
const neFail = Number(neByStatus.fail || 0);
|
const neFail = Number(neByStatus.fail || 0);
|
||||||
const neTesting = Number(neByStatus.testing || 0);
|
const neTesting = Number(neByStatus.testing || 0);
|
||||||
const neUnknown = Number(neByStatus.unknown || 0);
|
const neUnknown = Number(neByStatus.unknown || 0);
|
||||||
const neNoTag = Number(neStatsQuery.data?.no_tag_count || 0);
|
|
||||||
const neKnownPct = neTotal > 0 ? clampPct(((neTotal - neUnknown) / neTotal) * 100) : 0;
|
|
||||||
const neTopTags = Object.entries(neStatsQuery.data?.tag_counts ?? {})
|
|
||||||
.filter(([tag, n]) => tag && tag !== "__no_tag__" && Number(n) > 0)
|
|
||||||
.sort((a, b) => Number(b[1]) - Number(a[1]))
|
|
||||||
.slice(0, 2)
|
|
||||||
.map(([tag, n]) => ({ tag, n: Number(n) }));
|
|
||||||
const neValue = !canReadFleet
|
const neValue = !canReadFleet
|
||||||
? "—"
|
? "—"
|
||||||
: neStatsQuery.isLoading
|
: neStatsQuery.isLoading
|
||||||
|
|
@ -409,8 +398,6 @@ export function WorkbenchPage() {
|
||||||
|
|
||||||
const fabricNodes = Number(fabricQuery.data?.node_count || 0);
|
const fabricNodes = Number(fabricQuery.data?.node_count || 0);
|
||||||
const fabricEdges = Number(fabricQuery.data?.edge_count || 0);
|
const fabricEdges = Number(fabricQuery.data?.edge_count || 0);
|
||||||
const fabricDiscover = formatCompactTime(fabricQuery.data?.last_discover_at ?? null);
|
|
||||||
const fabricUpdated = formatCompactTime(fabricQuery.data?.updated_at ?? null);
|
|
||||||
|
|
||||||
const regionSlices = useMemo((): FleetSlice[] => {
|
const regionSlices = useMemo((): FleetSlice[] => {
|
||||||
const regions = topLevelRegions(topoTreeQuery.data?.root)
|
const regions = topLevelRegions(topoTreeQuery.data?.root)
|
||||||
|
|
@ -493,46 +480,78 @@ export function WorkbenchPage() {
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
const schedOnCount = schedRows.filter((r) => r.on).length;
|
const schedOnCount = schedRows.filter((r) => r.on).length;
|
||||||
const refreshing = [metricsQuery, opsQuery, neStatsQuery, fabricQuery, topoTreeQuery].some((query) => query.isFetching);
|
|
||||||
const refreshConsole = () => {
|
|
||||||
void metricsQuery.refetch();
|
|
||||||
void opsQuery.refetch();
|
|
||||||
if (canReadFleet) {
|
|
||||||
void neStatsQuery.refetch();
|
|
||||||
void fabricQuery.refetch();
|
|
||||||
void topoTreeQuery.refetch();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
const healthKnown = Boolean(metrics && hostOk && !metricsQuery.isError);
|
|
||||||
const healthTone = !healthKnown ? "is-unknown" : healthBusy ? "is-busy" : "is-ok";
|
|
||||||
const healthLabel = !healthKnown ? t("workbench.kpi.healthUnknown") : healthBusy ? t("workbench.kpi.healthWarn") : t("workbench.kpi.healthOk");
|
|
||||||
const taskValue = opsQuery.isLoading ? "…" : opsQuery.isError ? "—" : formatCount(activeTasks);
|
const taskValue = opsQuery.isLoading ? "…" : opsQuery.isError ? "—" : formatCount(activeTasks);
|
||||||
const schedValue = metricsQuery.isLoading ? "…" : !schedulers || metricsQuery.isError ? "—" : `${schedOnCount}/${schedRows.length}`;
|
const schedValue = metricsQuery.isLoading ? "…" : !schedulers || metricsQuery.isError ? "—" : `${schedOnCount}/${schedRows.length}`;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="workbench workbench--console">
|
<div className="workbench workbench--console">
|
||||||
<header className="wb-head">
|
<section className="wb-runtime wb-panel" aria-label={t("workbench.statusTitle")}>
|
||||||
<div>
|
<div className="wb-runtime__head"><ConsoleIcon kind="activity" /><h2 className="wb-panel-title">{t("workbench.statusTitle")}</h2></div>
|
||||||
<div className="wb-head__title-row">
|
{metricsQuery.isError && <p className="wb-runtime__error" role="status">{t("workbench.loadFailed")} · {t("workbench.retryHint")}</p>}
|
||||||
<h1 className="wb-head__title">{t("workbench.consoleTitle")}</h1>
|
<div className="wb-runtime__group wb-runtime__group--host">
|
||||||
<span className={`wb-head__health ${healthTone}`}><span className="wb-head__health-dot" aria-hidden="true" />{healthLabel}</span>
|
<StatLine label={t("workbench.gauge.cpu")} value={hostOk ? `${cpuPct}%` : metricsPlaceholder} pct={hostOk ? cpuPct : undefined} />
|
||||||
|
<StatLine label={t("workbench.gauge.mem")} value={memValue} pct={hostOk ? memPct : undefined} />
|
||||||
|
<StatLine label={t("workbench.gauge.storage")} value={storageValue} muted={!storageOk} />
|
||||||
</div>
|
</div>
|
||||||
|
<div className="wb-runtime__group wb-runtime__group--capacity">
|
||||||
|
<StatLine label={t("workbench.gauge.cli")} value={metrics?.cli_budget ? `${cliUsed}/${cliLimit}` : metricsPlaceholder} pct={metrics?.cli_budget ? cliPct : undefined} />
|
||||||
|
<StatLine label={t("workbench.gauge.db")} value={metrics?.db_pool ? `${dbOut}/${dbSize}` : metricsPlaceholder} pct={metrics?.db_pool ? dbPct : undefined} />
|
||||||
|
<StatLine label={t("workbench.gauge.webcrt")} value={metrics?.webcrt ? `${webUsed}/${webMax}` : metricsPlaceholder} pct={metrics?.webcrt ? webPct : undefined} />
|
||||||
</div>
|
</div>
|
||||||
<div className="wb-head__actions">
|
<div className="wb-runtime__foot"><span>{t("workbench.kpi.uptime")}</span><strong>{metrics ? formatAgeSec(metrics.uptime_sec) : metricsPlaceholder}</strong></div>
|
||||||
<span className="wb-head__updated">{metricsQuery.dataUpdatedAt ? t("workbench.refreshedAt", { time: new Date(metricsQuery.dataUpdatedAt).toLocaleTimeString(undefined, { hour12: false }) }) : t("workbench.awaitingData")}</span>
|
</section>
|
||||||
<Button size="sm" variant="outline" className="wb-refresh" isDisabled={refreshing} onPress={refreshConsole}><span className={refreshing ? "wb-refresh__icon is-spinning" : "wb-refresh__icon"}><ConsoleIcon kind="refresh" /></span>{t("workbench.refresh")}</Button>
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<div className="wb-body">
|
<div className="wb-body">
|
||||||
<div className="wb-main">
|
|
||||||
<WorkbenchModules sections={displaySections} />
|
<WorkbenchModules sections={displaySections} />
|
||||||
|
<aside className="wb-side" aria-label={t("workbench.sidePanel")}>
|
||||||
<section className="wb-fleet wb-panel" aria-label={t("workbench.fleet")}>
|
<section className="wb-rail wb-panel wb-rail--tasks">
|
||||||
<div className="wb-fleet__head">
|
<div className="wb-rail__head">
|
||||||
<h2 className="wb-fleet__title">{t("workbench.fleet")}</h2>
|
<h2 className="wb-rail__title">
|
||||||
<span className="wb-fleet__live"><span aria-hidden="true" />{t("workbench.autoRefresh")}</span>
|
{t("workbench.taskRail")}
|
||||||
|
<span className="wb-rail__count">{taskValue}</span>
|
||||||
|
</h2>
|
||||||
|
<Button
|
||||||
|
type="button"
|
||||||
|
size="sm"
|
||||||
|
variant="ghost"
|
||||||
|
className="wb-rail__all"
|
||||||
|
onPress={() => openOrFocusModule({ moduleId: "audit", path: "/audit/tasks" })}
|
||||||
|
>
|
||||||
|
{t("workbench.taskRailAll")}
|
||||||
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{opsQuery.isLoading ? <p className="wb-rail__empty" role="status">{t("workbench.loadingTasks")}</p> : opsQuery.isError ? (
|
||||||
|
<div className="wb-rail__empty wb-rail__empty--error" role="status"><ConsoleIcon kind="activity" /><strong>{t("workbench.loadFailed")}</strong><Button size="sm" variant="ghost" onPress={() => void opsQuery.refetch()}>{t("workbench.retry")}</Button></div>
|
||||||
|
) : railTasks.length === 0 ? (
|
||||||
|
<div className="wb-rail__empty"><span className="wb-rail__empty-icon"><ConsoleIcon kind="check" /></span><strong>{t("workbench.taskRailEmpty")}</strong></div>
|
||||||
|
) : (
|
||||||
|
<ul className="wb-rail__list">
|
||||||
|
{railTasks.map((row) => (
|
||||||
|
<li key={`${row.kind}:${row.id}`}>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
className="wb-rail__item"
|
||||||
|
onClick={() => openTaskHref(row.href)}
|
||||||
|
>
|
||||||
|
<span className="wb-rail__item-title">{taskTitle(row, t)}</span>
|
||||||
|
<span className="wb-rail__item-meta">
|
||||||
|
<span className={`wb-rail__status wb-rail__status--${statusTone(row.status)}`}>
|
||||||
|
{statusLabel(row.status, t)}
|
||||||
|
</span>
|
||||||
|
{row.progress ? (
|
||||||
|
<span className="wb-rail__progress"> · {row.progress}</span>
|
||||||
|
) : null}
|
||||||
|
</span>
|
||||||
|
<span className="wb-rail__time">{formatCompactTime(row.updated_at || row.started_at)}</span>
|
||||||
|
</button>
|
||||||
|
</li>
|
||||||
|
))}
|
||||||
|
</ul>
|
||||||
|
)}
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</aside>
|
||||||
|
<section className="wb-fleet wb-panel" aria-label={t("workbench.fleet")}>
|
||||||
<div className="wb-fleet__grid">
|
<div className="wb-fleet__grid">
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
|
|
@ -542,9 +561,7 @@ export function WorkbenchPage() {
|
||||||
>
|
>
|
||||||
<div className="wb-fleet__card-top">
|
<div className="wb-fleet__card-top">
|
||||||
<div className="wb-fleet__card-label">{t("workbench.fleetNe")}</div>
|
<div className="wb-fleet__card-label">{t("workbench.fleetNe")}</div>
|
||||||
<span className="wb-fleet__card-badge">
|
{neStatsQuery.isError ? <span className="wb-fleet__card-badge is-warn">{t("workbench.loadFailed")}</span> : null}
|
||||||
{neStatsQuery.isError ? t("workbench.loadFailed") : canReadFleet && neStatsQuery.data ? `${t("workbench.fleetNeKnown")} ${neKnownPct}%` : "—"}
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div className="wb-fleet__viz">
|
<div className="wb-fleet__viz">
|
||||||
<FleetDonut
|
<FleetDonut
|
||||||
|
|
@ -592,23 +609,6 @@ export function WorkbenchPage() {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="wb-fleet__foot">
|
|
||||||
<span>
|
|
||||||
{t("workbench.fleetNeTags")}{" "}
|
|
||||||
{canReadFleet && neTopTags.length > 0 ? (
|
|
||||||
neTopTags.map((x, i) => (
|
|
||||||
<em key={x.tag}>
|
|
||||||
{i > 0 ? " · " : ""}
|
|
||||||
{x.tag} {formatCount(x.n)}
|
|
||||||
</em>
|
|
||||||
))
|
|
||||||
) : (
|
|
||||||
<em>
|
|
||||||
{t("workbench.fleetNeNoTag")} {dash(neNoTag)}
|
|
||||||
</em>
|
|
||||||
)}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
|
|
@ -666,16 +666,6 @@ export function WorkbenchPage() {
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="wb-fleet__foot">
|
|
||||||
<span>
|
|
||||||
{t("workbench.fleetTopoDiscover")}{" "}
|
|
||||||
<em>{canReadFleet ? fabricDiscover : "—"}</em>
|
|
||||||
</span>
|
|
||||||
<span>
|
|
||||||
{t("workbench.fleetTopoUpdated")}{" "}
|
|
||||||
<em>{canReadFleet ? fabricUpdated : "—"}</em>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
|
|
@ -683,8 +673,8 @@ export function WorkbenchPage() {
|
||||||
>
|
>
|
||||||
<div className="wb-fleet__card-top">
|
<div className="wb-fleet__card-top">
|
||||||
<div className="wb-fleet__card-label">{t("workbench.fleetSched")}</div>
|
<div className="wb-fleet__card-label">{t("workbench.fleetSched")}</div>
|
||||||
<span className="wb-fleet__card-badge">
|
<span className={`wb-fleet__card-badge${schedStale ? " is-warn" : ""}`} title={`${t("workbench.fleetSchedHeartbeat")} ${formatAgeSec(schedAge)}`}>
|
||||||
{schedValue} · {t("workbench.enabledSchedulers")}
|
{schedValue}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="wb-fleet__viz">
|
<div className="wb-fleet__viz">
|
||||||
|
|
@ -714,86 +704,10 @@ export function WorkbenchPage() {
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="wb-fleet__foot">
|
|
||||||
<span>
|
|
||||||
{t("workbench.fleetSchedMode")} <em>{schedMode || "—"}</em>
|
|
||||||
</span>
|
|
||||||
<span>
|
|
||||||
{t("workbench.fleetSchedHeartbeat")}{" "}
|
|
||||||
<em className={schedStale ? "is-warn" : "is-ok"}>{formatAgeSec(schedAge)}</em>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<aside className="wb-side" aria-label={t("workbench.sidePanel")}>
|
|
||||||
<section className="wb-rail wb-panel wb-rail--tasks">
|
|
||||||
<div className="wb-rail__head">
|
|
||||||
<h2 className="wb-rail__title">
|
|
||||||
{t("workbench.taskRail")}
|
|
||||||
<span className="wb-rail__count">{taskValue}</span>
|
|
||||||
</h2>
|
|
||||||
<Button
|
|
||||||
type="button"
|
|
||||||
size="sm"
|
|
||||||
variant="ghost"
|
|
||||||
className="wb-rail__all"
|
|
||||||
onPress={() => openOrFocusModule({ moduleId: "audit", path: "/audit/tasks" })}
|
|
||||||
>
|
|
||||||
{t("workbench.taskRailAll")}
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{opsQuery.isLoading ? <p className="wb-rail__empty" role="status">{t("workbench.loadingTasks")}</p> : opsQuery.isError ? (
|
|
||||||
<div className="wb-rail__empty wb-rail__empty--error" role="status"><ConsoleIcon kind="activity" /><strong>{t("workbench.loadFailed")}</strong><Button size="sm" variant="ghost" onPress={() => void opsQuery.refetch()}>{t("workbench.retry")}</Button></div>
|
|
||||||
) : railTasks.length === 0 ? (
|
|
||||||
<div className="wb-rail__empty"><span className="wb-rail__empty-icon"><ConsoleIcon kind="check" /></span><strong>{t("workbench.taskRailEmpty")}</strong></div>
|
|
||||||
) : (
|
|
||||||
<ul className="wb-rail__list">
|
|
||||||
{railTasks.map((row) => (
|
|
||||||
<li key={`${row.kind}:${row.id}`}>
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
className="wb-rail__item"
|
|
||||||
onClick={() => openTaskHref(row.href)}
|
|
||||||
>
|
|
||||||
<span className="wb-rail__item-title">{taskTitle(row, t)}</span>
|
|
||||||
<span className="wb-rail__item-meta">
|
|
||||||
<span className={`wb-rail__status wb-rail__status--${statusTone(row.status)}`}>
|
|
||||||
{statusLabel(row.status, t)}
|
|
||||||
</span>
|
|
||||||
{row.progress ? (
|
|
||||||
<span className="wb-rail__progress"> · {row.progress}</span>
|
|
||||||
) : null}
|
|
||||||
</span>
|
|
||||||
<span className="wb-rail__time">{formatCompactTime(row.updated_at || row.started_at)}</span>
|
|
||||||
</button>
|
|
||||||
</li>
|
|
||||||
))}
|
|
||||||
</ul>
|
|
||||||
)}
|
|
||||||
</section>
|
|
||||||
|
|
||||||
</aside>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<section className="wb-runtime wb-panel" aria-label={t("workbench.statusTitle")}>
|
|
||||||
<div className="wb-runtime__head"><h2 className="wb-panel-title">{t("workbench.statusTitle")}</h2><ConsoleIcon kind="activity" /></div>
|
|
||||||
{metricsQuery.isError && <p className="wb-runtime__error" role="status">{t("workbench.loadFailed")} · {t("workbench.retryHint")}</p>}
|
|
||||||
<div className="wb-runtime__group wb-runtime__group--host"><h3>{t("workbench.hostHealth")}</h3>
|
|
||||||
<StatLine label={t("workbench.gauge.cpu")} value={hostOk ? `${cpuPct}%` : metricsPlaceholder} pct={hostOk ? cpuPct : undefined} />
|
|
||||||
<StatLine label={t("workbench.gauge.mem")} value={memValue} pct={hostOk ? memPct : undefined} />
|
|
||||||
<StatLine label={t("workbench.gauge.storage")} value={storageValue} muted={!storageOk} />
|
|
||||||
</div>
|
|
||||||
<div className="wb-runtime__group wb-runtime__group--capacity"><h3>{t("workbench.channels")}</h3>
|
|
||||||
<StatLine label={t("workbench.gauge.cli")} value={metrics?.cli_budget ? `${cliUsed}/${cliLimit}` : metricsPlaceholder} pct={metrics?.cli_budget ? cliPct : undefined} />
|
|
||||||
<StatLine label={t("workbench.gauge.db")} value={metrics?.db_pool ? `${dbOut}/${dbSize}` : metricsPlaceholder} pct={metrics?.db_pool ? dbPct : undefined} />
|
|
||||||
<StatLine label={t("workbench.gauge.webcrt")} value={metrics?.webcrt ? `${webUsed}/${webMax}` : metricsPlaceholder} pct={metrics?.webcrt ? webPct : undefined} />
|
|
||||||
</div>
|
|
||||||
<div className="wb-runtime__foot"><span>{t("workbench.kpi.uptime")}</span><strong>{metrics ? formatAgeSec(metrics.uptime_sec) : metricsPlaceholder}</strong></div>
|
|
||||||
</section>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,70 +1,33 @@
|
||||||
import { useMemo, useState } from "react";
|
|
||||||
import { Button } from "@heroui/react";
|
import { Button } from "@heroui/react";
|
||||||
import type { ModuleDefinition } from "../../../config/modules";
|
import type { ModuleDefinition } from "../../../config/modules";
|
||||||
import { useI18n } from "../../../i18n";
|
import { useI18n } from "../../../i18n";
|
||||||
import { openOrFocusModule } from "../../../utils/moduleWindows";
|
import { openOrFocusModule } from "../../../utils/moduleWindows";
|
||||||
import { ConsoleIcon } from "./ConsoleIcon";
|
|
||||||
import { WorkbenchCardIcon } from "./WorkbenchCardIcon";
|
import { WorkbenchCardIcon } from "./WorkbenchCardIcon";
|
||||||
|
|
||||||
export type DisplaySection = { key: "operations" | "system"; mods: ModuleDefinition[] };
|
export type DisplaySection = { key: "operations" | "system"; mods: ModuleDefinition[] };
|
||||||
|
|
||||||
function moduleDescription(mod: ModuleDefinition, t: (key: string) => string) {
|
/** Primary modules as a grid of tiles, system admin as a quiet link row. */
|
||||||
const key = `workbench.descriptions.${mod.moduleId}`;
|
|
||||||
const description = t(key);
|
|
||||||
return description === key ? t(mod.titleKey) : description;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function WorkbenchModules({ sections }: { sections: DisplaySection[] }) {
|
export function WorkbenchModules({ sections }: { sections: DisplaySection[] }) {
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const [search, setSearch] = useState("");
|
|
||||||
const filtered = useMemo(() => {
|
|
||||||
const term = search.trim().toLocaleLowerCase();
|
|
||||||
return sections.map((section) => ({
|
|
||||||
...section,
|
|
||||||
mods: section.mods.filter((mod) =>
|
|
||||||
[t(mod.labelKey), moduleDescription(mod, t), mod.moduleId]
|
|
||||||
.some((value) => value.toLocaleLowerCase().includes(term)),
|
|
||||||
),
|
|
||||||
})).filter((section) => section.mods.length > 0);
|
|
||||||
}, [sections, search, t]);
|
|
||||||
const count = filtered.reduce((sum, section) => sum + section.mods.length, 0);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section className="wb-modules wb-panel" aria-label={t("workbench.modules")}>
|
<section className="wb-modules wb-panel" aria-label={t("workbench.modules")}>
|
||||||
<div className="wb-modules__head">
|
{sections.map((section) => (
|
||||||
<div>
|
<div key={section.key} className={`wb-section wb-section--${section.key}`} role="group" aria-label={t(`workbench.${section.key}`)}>
|
||||||
<h2 className="wb-panel-title">{t("workbench.modules")}</h2>
|
|
||||||
</div>
|
|
||||||
<div className="wb-search">
|
|
||||||
<ConsoleIcon kind="search" />
|
|
||||||
<input
|
|
||||||
type="search"
|
|
||||||
value={search}
|
|
||||||
aria-label={t("workbench.searchModules")}
|
|
||||||
placeholder={t("workbench.searchModules")}
|
|
||||||
onChange={(event) => setSearch(event.target.value)}
|
|
||||||
onKeyDown={(event) => { if (event.key === "Escape") setSearch(""); }}
|
|
||||||
/>
|
|
||||||
{search && <Button isIconOnly size="sm" variant="ghost" className="wb-search__clear" aria-label={t("workbench.clearSearch")} onPress={() => setSearch("")}><ConsoleIcon kind="close" /></Button>}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<span className="wb-sr-only" role="status">{t("workbench.moduleCount", { count })}</span>
|
|
||||||
{filtered.map((section) => (
|
|
||||||
<div key={section.key} className={`wb-section wb-section--${section.key}`}>
|
|
||||||
<div className={section.key === "operations" ? "wb-sr-only" : "wb-section__head"}>
|
|
||||||
<h3 className="wb-section__title">{t(`workbench.${section.key}`)}</h3>
|
|
||||||
</div>
|
|
||||||
<div className="wb-tiles">
|
|
||||||
{section.mods.map((mod) => (
|
{section.mods.map((mod) => (
|
||||||
<Button key={mod.moduleId} variant="ghost" className={`wb-tile wb-tile--${mod.iconTone}`} aria-label={`${t(mod.labelKey)} · ${t("workbench.openModule")}`} onPress={() => openOrFocusModule({ moduleId: mod.moduleId, path: mod.path })}>
|
<Button
|
||||||
|
key={mod.moduleId}
|
||||||
|
variant="ghost"
|
||||||
|
className={`wb-tile wb-tile--${mod.iconTone}`}
|
||||||
|
aria-label={`${t(mod.labelKey)} · ${t("workbench.openModule")}`}
|
||||||
|
onPress={() => openOrFocusModule({ moduleId: mod.moduleId, path: mod.path })}
|
||||||
|
>
|
||||||
<WorkbenchCardIcon tone={mod.iconTone} kind={mod.iconKind} />
|
<WorkbenchCardIcon tone={mod.iconTone} kind={mod.iconKind} />
|
||||||
<span className="wb-tile__label">{t(mod.labelKey)}</span>
|
<span className="wb-tile__label">{t(mod.labelKey)}</span>
|
||||||
</Button>
|
</Button>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
))}
|
))}
|
||||||
{count === 0 && <div className="wb-modules__empty"><ConsoleIcon kind="search" /><p>{t("workbench.noModules")}</p><Button size="sm" variant="ghost" onPress={() => setSearch("")}>{t("workbench.clearSearch")}</Button></div>}
|
|
||||||
</section>
|
</section>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ const layout = {
|
||||||
netxApi: "netx api",
|
netxApi: "netx api",
|
||||||
oclawBridge: "oclaw WSS",
|
oclawBridge: "oclaw WSS",
|
||||||
activeTasks: "Active {{count}}",
|
activeTasks: "Active {{count}}",
|
||||||
|
activeTasksLabel: "Tasks",
|
||||||
activeTasksHint: "Open Audit · Task overview",
|
activeTasksHint: "Open Audit · Task overview",
|
||||||
language: "Language",
|
language: "Language",
|
||||||
switchLanguage: "Switch language / 切换语言",
|
switchLanguage: "Switch language / 切换语言",
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ const layout = {
|
||||||
netxApi: "netx api",
|
netxApi: "netx api",
|
||||||
oclawBridge: "oclaw WSS",
|
oclawBridge: "oclaw WSS",
|
||||||
activeTasks: "活跃任务 {{count}}",
|
activeTasks: "活跃任务 {{count}}",
|
||||||
|
activeTasksLabel: "任务",
|
||||||
activeTasksHint: "打开操作审计 · 任务概览",
|
activeTasksHint: "打开操作审计 · 任务概览",
|
||||||
language: "语言",
|
language: "语言",
|
||||||
switchLanguage: "切换语言 / Switch language",
|
switchLanguage: "切换语言 / Switch language",
|
||||||
|
|
|
||||||
|
|
@ -28,3 +28,4 @@
|
||||||
|
|
||||||
/* Design language layer — must stay last. */
|
/* Design language layer — must stay last. */
|
||||||
@import "./styles/theme/theme.css";
|
@import "./styles/theme/theme.css";
|
||||||
|
@import "./styles/theme/glass.css";
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
import { Link, useLocation } from "react-router-dom";
|
import { Link, useLocation } from "react-router-dom";
|
||||||
import type { ReactNode } from "react";
|
import type { Key, ReactNode } from "react";
|
||||||
import { useQuery } from "@tanstack/react-query";
|
import { useQuery } from "@tanstack/react-query";
|
||||||
import { Button, Chip } from "@heroui/react";
|
import { Button, Dropdown } from "@heroui/react";
|
||||||
import { AppsGridIcon } from "./AppsGridIcon";
|
import { AppsGridIcon } from "./AppsGridIcon";
|
||||||
|
import { BrandMark } from "./BrandMark";
|
||||||
import { HeaderMenu } from "./HeaderMenu";
|
import { HeaderMenu } from "./HeaderMenu";
|
||||||
import { getPageTitleKey, isWorkbenchPath } from "../config/modules";
|
import { getPageTitleKey, isWorkbenchPath } from "../config/modules";
|
||||||
import { useAppWindowRegistration } from "../hooks/useAppWindowRegistration";
|
import { useAppWindowRegistration } from "../hooks/useAppWindowRegistration";
|
||||||
|
|
@ -33,22 +34,41 @@ export function AppLayout({ children }: Props) {
|
||||||
});
|
});
|
||||||
const activeTasks = opsTasksQuery.data?.active ?? 0;
|
const activeTasks = opsTasksQuery.data?.active ?? 0;
|
||||||
const activeTaskCount = opsTasksQuery.isLoading ? "…" : opsTasksQuery.isError ? "—" : activeTasks;
|
const activeTaskCount = opsTasksQuery.isLoading ? "…" : opsTasksQuery.isError ? "—" : activeTasks;
|
||||||
|
const tasksBusy = !opsTasksQuery.isError && activeTasks > 0;
|
||||||
|
const roleLabel = user?.role === "admin" ? t("auth.roleAdmin") : t("auth.roleUser");
|
||||||
|
|
||||||
useAppWindowRegistration(pathname);
|
useAppWindowRegistration(pathname);
|
||||||
|
|
||||||
|
const onUserAction = (key: Key) => {
|
||||||
|
if (key === "logout") void logout();
|
||||||
|
};
|
||||||
|
|
||||||
|
const brand = (
|
||||||
|
<>
|
||||||
|
<BrandMark className="app-brand__mark" />
|
||||||
|
<span className="app-brand__wordmark">NETX</span>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="app app--shell">
|
<div className="app app--shell">
|
||||||
<header className="app-brand">
|
<header className="app-brand">
|
||||||
<div className="app-brand__start">
|
<div className="app-brand__start">
|
||||||
{onWorkbench ? (
|
{onWorkbench ? (
|
||||||
<Link to="/" className="app-brand__logo">
|
<Link to="/" className="app-brand__logo">{brand}</Link>
|
||||||
NETX
|
|
||||||
</Link>
|
|
||||||
) : (
|
) : (
|
||||||
<span className="app-brand__logo app-brand__logo--static">NETX</span>
|
<button type="button" className="app-brand__logo" onClick={returnToWorkbench} title={t("workbench.backToWorkbench")}>
|
||||||
|
{brand}
|
||||||
|
</button>
|
||||||
)}
|
)}
|
||||||
|
{onWorkbench ? (
|
||||||
|
<span className="app-brand__crumb">
|
||||||
|
<span className="app-brand__sep" aria-hidden />
|
||||||
|
<span className="app-brand__module-title">{t("workbench.consoleTitle")}</span>
|
||||||
|
</span>
|
||||||
|
) : null}
|
||||||
{!onWorkbench ? (
|
{!onWorkbench ? (
|
||||||
<>
|
<nav className="app-brand__crumb" aria-label={pageTitle}>
|
||||||
<span className="app-brand__sep" aria-hidden />
|
<span className="app-brand__sep" aria-hidden />
|
||||||
<Button
|
<Button
|
||||||
isIconOnly
|
isIconOnly
|
||||||
|
|
@ -61,36 +81,48 @@ export function AppLayout({ children }: Props) {
|
||||||
<AppsGridIcon />
|
<AppsGridIcon />
|
||||||
</Button>
|
</Button>
|
||||||
<span className="app-brand__module-title">{pageTitle}</span>
|
<span className="app-brand__module-title">{pageTitle}</span>
|
||||||
</>
|
</nav>
|
||||||
) : null}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
<div className="app-brand__actions">
|
<div className="app-brand__actions">
|
||||||
{user ? (
|
{user ? (
|
||||||
<div className="app-brand__actions-group">
|
<>
|
||||||
<Button
|
<Button
|
||||||
size="sm"
|
size="sm"
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
className="conn-pill conn-pill--on-brand conn-pill--tasks"
|
className={`app-brand__btn app-brand__tasks${tasksBusy ? " is-busy" : ""}`}
|
||||||
aria-label={t("layout.activeTasks", { count: activeTaskCount })}
|
aria-label={`${t("layout.activeTasks", { count: activeTaskCount })} · ${t("layout.activeTasksHint")}`}
|
||||||
onPress={() => openOrFocusModule({ moduleId: "audit", path: "/audit/tasks" })}
|
onPress={() => openOrFocusModule({ moduleId: "audit", path: "/audit/tasks" })}
|
||||||
>
|
>
|
||||||
<svg viewBox="0 0 20 20" width="13" height="13" fill="none" stroke="currentColor" strokeWidth="1.5" aria-hidden="true"><path d="M3 5h14M3 10h10M3 15h7" /></svg>
|
<span className="app-brand__tasks-dot" aria-hidden="true" />
|
||||||
<span className="app-brand__tasks-text">{t("layout.activeTasks", { count: activeTaskCount })}</span>
|
<span className="app-brand__tasks-text">{t("layout.activeTasksLabel")}</span>
|
||||||
<span className="app-brand__tasks-count" aria-hidden="true">{activeTaskCount}</span>
|
<span className="app-brand__tasks-count">{activeTaskCount}</span>
|
||||||
</Button>
|
|
||||||
<Chip size="sm" variant="soft" className="conn-pill conn-pill--on-brand conn-pill--user" title={user.role}>
|
|
||||||
<Chip.Label>{user.username}</Chip.Label>
|
|
||||||
</Chip>
|
|
||||||
<Button
|
|
||||||
size="sm"
|
|
||||||
variant="ghost"
|
|
||||||
className="header-menu__trigger header-menu__trigger--on-brand"
|
|
||||||
onPress={() => void logout()}
|
|
||||||
>
|
|
||||||
{t("auth.logout")}
|
|
||||||
</Button>
|
</Button>
|
||||||
<HeaderMenu />
|
<HeaderMenu />
|
||||||
|
<span className="app-brand__divider" aria-hidden="true" />
|
||||||
|
<Dropdown>
|
||||||
|
<Button size="sm" variant="ghost" className="app-brand__btn app-brand__user" aria-label={`${user.username} · ${roleLabel}`}>
|
||||||
|
<span className="app-brand__avatar" aria-hidden="true">{user.username.slice(0, 1).toUpperCase()}</span>
|
||||||
|
<span className="app-brand__user-name">{user.username}</span>
|
||||||
|
<svg className="app-brand__chevron" viewBox="0 0 16 16" width="12" height="12" fill="none" stroke="currentColor" strokeWidth="1.6" aria-hidden="true"><path d="m4 6 4 4 4-4" /></svg>
|
||||||
|
</Button>
|
||||||
|
<Dropdown.Popover className="app-brand__menu" placement="bottom end">
|
||||||
|
<div className="app-brand__menu-head">
|
||||||
|
<span className="app-brand__avatar app-brand__avatar--lg" aria-hidden="true">{user.username.slice(0, 1).toUpperCase()}</span>
|
||||||
|
<span className="app-brand__menu-id">
|
||||||
|
<strong>{user.username}</strong>
|
||||||
|
<span>{roleLabel}</span>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
<Dropdown.Menu aria-label={user.username} onAction={onUserAction}>
|
||||||
|
<Dropdown.Item id="logout" textValue={t("auth.logout")} className="app-brand__menu-item">
|
||||||
|
<svg viewBox="0 0 20 20" width="15" height="15" fill="none" stroke="currentColor" strokeWidth="1.6" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"><path d="M12 4h3a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1h-3M8 14l-4-4 4-4M4 10h9" /></svg>
|
||||||
|
{t("auth.logout")}
|
||||||
|
</Dropdown.Item>
|
||||||
|
</Dropdown.Menu>
|
||||||
|
</Dropdown.Popover>
|
||||||
|
</Dropdown>
|
||||||
|
</>
|
||||||
) : (
|
) : (
|
||||||
<HeaderMenu />
|
<HeaderMenu />
|
||||||
)}
|
)}
|
||||||
|
|
|
||||||
23
web/src/layout/BrandMark.tsx
Normal file
23
web/src/layout/BrandMark.tsx
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
import { useId } from "react";
|
||||||
|
|
||||||
|
/** NETX mark: an "X" of links, four nodes around a hub; one node lit as "live". */
|
||||||
|
export function BrandMark({ size = 24, className }: { size?: number; className?: string }) {
|
||||||
|
const gid = useId();
|
||||||
|
return (
|
||||||
|
<svg className={className} viewBox="0 0 24 24" width={size} height={size} aria-hidden="true">
|
||||||
|
<defs>
|
||||||
|
<linearGradient id={gid} x1="0" y1="0" x2="24" y2="24" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop offset="0" stopColor="#3b82f6" />
|
||||||
|
<stop offset="1" stopColor="#1d4ed8" />
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<rect width="24" height="24" rx="6.5" fill={`url(#${gid})`} />
|
||||||
|
<path d="M7 7l10 10M17 7 7 17" stroke="#fff" strokeOpacity=".55" strokeWidth="1.6" strokeLinecap="round" />
|
||||||
|
<circle cx="12" cy="12" r="2.6" fill="#fff" />
|
||||||
|
<circle cx="7" cy="7" r="1.9" fill="#fff" />
|
||||||
|
<circle cx="7" cy="17" r="1.9" fill="#fff" />
|
||||||
|
<circle cx="17" cy="17" r="1.9" fill="#fff" />
|
||||||
|
<circle cx="17" cy="7" r="2.1" fill="#67e8f9" />
|
||||||
|
</svg>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -11,11 +11,12 @@ export function HeaderMenu() {
|
||||||
<Button
|
<Button
|
||||||
size="sm"
|
size="sm"
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
className="header-menu__trigger header-menu__trigger--on-brand header-menu__trigger--locale"
|
className="app-brand__btn app-brand__locale"
|
||||||
aria-label={t("layout.switchLanguage")}
|
aria-label={t("layout.switchLanguage")}
|
||||||
onPress={() => setLocale(next)}
|
onPress={() => setLocale(next)}
|
||||||
>
|
>
|
||||||
{label}
|
<svg viewBox="0 0 20 20" width="14" height="14" fill="none" stroke="currentColor" strokeWidth="1.5" aria-hidden="true"><circle cx="10" cy="10" r="7.25" /><path d="M2.75 10h14.5M10 2.75c2 2 3 4.4 3 7.25s-1 5.25-3 7.25c-2-2-3-4.4-3-7.25s1-5.25 3-7.25Z" /></svg>
|
||||||
|
<span>{label}</span>
|
||||||
</Button>
|
</Button>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,92 +1,3 @@
|
||||||
/* Shared primitives: header menu, buttons, inputs, cards, tables, pills, toast, spinner, help-hint */
|
|
||||||
|
|
||||||
.header-menu__panel--light {
|
|
||||||
background: var(--nx-surface-2);
|
|
||||||
border-color: var(--nx-line);
|
|
||||||
box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-menu__label--light {
|
|
||||||
color: var(--nx-text-muted);
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-menu__item--light {
|
|
||||||
color: var(--nx-text);
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-menu__item--light:hover {
|
|
||||||
background: var(--nx-text-strong);
|
|
||||||
color: var(--nx-surface-2);
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-menu__item--active-light {
|
|
||||||
background: #e3f2fd;
|
|
||||||
color: var(--nm-accent, var(--nx-accent-strong));
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-menu {
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-menu__trigger {
|
|
||||||
min-width: 36px;
|
|
||||||
height: 36px;
|
|
||||||
padding: 0 10px;
|
|
||||||
font-size: 20px;
|
|
||||||
line-height: 1;
|
|
||||||
letter-spacing: 0.12em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-menu__trigger:hover,
|
|
||||||
.header-menu__trigger:focus-visible {
|
|
||||||
border-color: #3d82f7;
|
|
||||||
outline: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-menu__panel {
|
|
||||||
position: absolute;
|
|
||||||
top: calc(100% + 6px);
|
|
||||||
right: 0;
|
|
||||||
z-index: 50;
|
|
||||||
min-width: 148px;
|
|
||||||
padding: 6px;
|
|
||||||
border: 1px solid #2c405f;
|
|
||||||
border-radius: 10px;
|
|
||||||
background: #0f1e34;
|
|
||||||
box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-menu__label {
|
|
||||||
padding: 6px 10px 4px;
|
|
||||||
font-size: 11px;
|
|
||||||
color: #6b7f9c;
|
|
||||||
text-transform: uppercase;
|
|
||||||
letter-spacing: 0.04em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-menu__item {
|
|
||||||
display: block;
|
|
||||||
width: 100%;
|
|
||||||
text-align: left;
|
|
||||||
padding: 8px 10px;
|
|
||||||
border: none;
|
|
||||||
border-radius: 6px;
|
|
||||||
background: transparent;
|
|
||||||
color: #c1cde0;
|
|
||||||
font-size: 13px;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-menu__item:hover {
|
|
||||||
background: rgba(61, 130, 247, 0.14);
|
|
||||||
color: #dce8ff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-menu__item--active {
|
|
||||||
background: rgba(61, 130, 247, 0.22);
|
|
||||||
color: #dce8ff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.app-main button,
|
.app-main button,
|
||||||
.app-main select,
|
.app-main select,
|
||||||
.app-main input,
|
.app-main input,
|
||||||
|
|
@ -386,141 +297,6 @@ pre {
|
||||||
background: rgba(148, 163, 184, 0.1);
|
background: rgba(148, 163, 184, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Brand header chips/buttons — must follow global button/conn-pill rules. */
|
|
||||||
.app-brand .conn-pill.conn-pill--on-brand {
|
|
||||||
display: inline-flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 6px;
|
|
||||||
height: 24px;
|
|
||||||
padding: 0 10px;
|
|
||||||
border: 1px solid rgba(255, 255, 255, 0.16);
|
|
||||||
border-radius: 999px;
|
|
||||||
background: rgba(255, 255, 255, 0.08);
|
|
||||||
color: rgba(255, 255, 255, 0.82);
|
|
||||||
font-size: 11px;
|
|
||||||
font-weight: 400;
|
|
||||||
line-height: 1;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
.app-brand .conn-pill.conn-pill--on-brand::before {
|
|
||||||
content: "";
|
|
||||||
width: 6px;
|
|
||||||
height: 6px;
|
|
||||||
border-radius: 50%;
|
|
||||||
background: var(--nx-text-muted);
|
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.app-brand .conn-pill.conn-pill--on-brand.conn-pill--up {
|
|
||||||
border-color: rgba(255, 255, 255, 0.16);
|
|
||||||
background: rgba(255, 255, 255, 0.08);
|
|
||||||
color: rgba(255, 255, 255, 0.82);
|
|
||||||
}
|
|
||||||
|
|
||||||
.app-brand .conn-pill.conn-pill--on-brand.conn-pill--up::before {
|
|
||||||
background: #4ade80;
|
|
||||||
}
|
|
||||||
|
|
||||||
.app-brand .conn-pill.conn-pill--on-brand.conn-pill--down {
|
|
||||||
border-color: rgba(248, 113, 113, 0.35);
|
|
||||||
background: rgba(127, 29, 29, 0.35);
|
|
||||||
color: #fecaca;
|
|
||||||
}
|
|
||||||
|
|
||||||
.app-brand .conn-pill.conn-pill--on-brand.conn-pill--down::before {
|
|
||||||
background: #f87171;
|
|
||||||
}
|
|
||||||
|
|
||||||
.app-brand .conn-pill.conn-pill--on-brand.conn-pill--unknown {
|
|
||||||
border-color: rgba(255, 255, 255, 0.16);
|
|
||||||
background: rgba(255, 255, 255, 0.08);
|
|
||||||
color: rgba(255, 255, 255, 0.7);
|
|
||||||
}
|
|
||||||
|
|
||||||
.app-brand .conn-pill.conn-pill--on-brand.conn-pill--unknown::before {
|
|
||||||
background: var(--nx-text-muted);
|
|
||||||
}
|
|
||||||
|
|
||||||
.app-brand .conn-pill.conn-pill--on-brand.conn-pill--user {
|
|
||||||
background: rgba(255, 255, 255, 0.08);
|
|
||||||
border-color: rgba(255, 255, 255, 0.16);
|
|
||||||
color: rgba(255, 255, 255, 0.78);
|
|
||||||
font-size: 11px;
|
|
||||||
font-weight: 400;
|
|
||||||
}
|
|
||||||
|
|
||||||
.app-brand .conn-pill.conn-pill--on-brand.conn-pill--user::before {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.app-brand button.conn-pill.conn-pill--on-brand.conn-pill--tasks {
|
|
||||||
cursor: pointer;
|
|
||||||
font: inherit;
|
|
||||||
font-size: 11px;
|
|
||||||
font-weight: 400;
|
|
||||||
}
|
|
||||||
|
|
||||||
.app-brand button.conn-pill.conn-pill--on-brand.conn-pill--tasks:hover,
|
|
||||||
.app-brand button.conn-pill.conn-pill--on-brand.conn-pill--tasks:focus-visible {
|
|
||||||
border-color: rgb(var(--nx-accent-rgb) / 0.55);
|
|
||||||
background: rgb(var(--nx-accent-rgb) / 0.22);
|
|
||||||
color: #fff;
|
|
||||||
outline: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.app-brand .header-menu__trigger.header-menu__trigger--on-brand {
|
|
||||||
display: inline-flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
height: 24px;
|
|
||||||
min-width: 24px;
|
|
||||||
padding: 0 10px;
|
|
||||||
border: 1px solid rgba(255, 255, 255, 0.16);
|
|
||||||
border-radius: 999px;
|
|
||||||
background: rgba(255, 255, 255, 0.08);
|
|
||||||
color: rgba(255, 255, 255, 0.78);
|
|
||||||
font-size: 11px;
|
|
||||||
font-weight: 400;
|
|
||||||
letter-spacing: normal;
|
|
||||||
line-height: 1;
|
|
||||||
box-shadow: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.app-brand .header-menu__trigger.header-menu__trigger--on-brand.header-menu__trigger--icon {
|
|
||||||
width: 24px;
|
|
||||||
padding: 0;
|
|
||||||
font-size: 14px;
|
|
||||||
letter-spacing: 0.06em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.app-brand .header-menu__trigger.header-menu__trigger--on-brand.header-menu__trigger--locale {
|
|
||||||
min-width: 36px;
|
|
||||||
padding: 0 8px;
|
|
||||||
font-size: 11px;
|
|
||||||
font-weight: 650;
|
|
||||||
letter-spacing: 0.04em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.app-brand .header-menu__trigger.header-menu__trigger--on-brand:hover,
|
|
||||||
.app-brand .header-menu__trigger.header-menu__trigger--on-brand:focus-visible {
|
|
||||||
background: rgb(var(--nx-accent-rgb) / 0.22);
|
|
||||||
border-color: rgb(var(--nx-accent-rgb) / 0.55);
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.app-brand .conn-pill.conn-pill--on-brand.conn-pill--up {
|
|
||||||
border-color: rgb(var(--nx-accent-rgb) / 0.35);
|
|
||||||
}
|
|
||||||
|
|
||||||
.app-brand button.conn-pill.conn-pill--on-brand.conn-pill--tasks:hover,
|
|
||||||
.app-brand button.conn-pill.conn-pill--on-brand.conn-pill--tasks:focus-visible {
|
|
||||||
border-color: rgb(var(--nx-accent-rgb) / 0.55);
|
|
||||||
background: rgb(var(--nx-accent-rgb) / 0.22);
|
|
||||||
color: #fff;
|
|
||||||
outline: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.toast,
|
.toast,
|
||||||
.app-toast {
|
.app-toast {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
/* App shell + brand header (.app--shell, .app-brand, .app-main) */
|
/* App shell + brand header (.app--shell, .app-brand, .app-main).
|
||||||
|
This file is the single owner of header styles. Height stays 48px:
|
||||||
|
several pages size themselves with calc(100vh - var(--nx-header-h)). */
|
||||||
|
|
||||||
.app--shell {
|
.app--shell {
|
||||||
/* --nm-* chrome tokens: see styles/theme/tokens.css */
|
/* --nm-* chrome tokens: see styles/theme/tokens.css */
|
||||||
|
|
@ -6,101 +8,315 @@
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
color: var(--nm-text);
|
color: var(--nm-text);
|
||||||
|
/* Ambient backdrop (what the glass bends) is owned by theme/glass.css. */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* The header capsule lines up with the page's content edge: --nx-gutter is the
|
||||||
|
horizontal inset of the page content (app-main pads 28px; some pages differ). */
|
||||||
|
.app--shell { --nx-gutter: 28px; }
|
||||||
|
.app--shell:has(.ne-page, .ume-page, .system-page) { --nx-gutter: 22px; }
|
||||||
|
/* Sidebar pages (network / audit / topology / WebCRT) float their panels on a
|
||||||
|
16px gutter (theme/glass.css), so the header capsule uses the same inset. */
|
||||||
|
.app--shell:has(.network-shell, .topo-page, .webcrt-shell) { --nx-gutter: 16px; }
|
||||||
|
/* The traffic wall is a true full-bleed screen: the glass becomes a full-width bar. */
|
||||||
|
.app--shell:has(.pt-wall-shell) { --nx-gutter: 0px; }
|
||||||
|
|
||||||
|
/* Liquid-glass header: the 48px strip stays in flow and transparent; the glass
|
||||||
|
is a floating capsule (::before) inset inside it. Page content scrolls under
|
||||||
|
it and shows through, blurred and saturated. */
|
||||||
.app-brand {
|
.app-brand {
|
||||||
|
--glass-inset: 5px;
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
z-index: 40;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
height: 48px;
|
gap: 16px;
|
||||||
padding: 0 20px;
|
height: var(--nx-header-h, 48px);
|
||||||
background: var(--nm-header, #0f1b2d);
|
padding: 0 calc(var(--nx-gutter) + 10px) 0 calc(var(--nx-gutter) + 6px);
|
||||||
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
|
background: transparent;
|
||||||
box-shadow: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.app-brand__logo {
|
.app-brand::before {
|
||||||
font-size: 18px;
|
content: "";
|
||||||
font-weight: 700;
|
position: absolute;
|
||||||
letter-spacing: 0.12em;
|
inset: var(--glass-inset) var(--nx-gutter);
|
||||||
color: #fff;
|
z-index: -1;
|
||||||
text-decoration: none;
|
border-radius: 14px;
|
||||||
flex-shrink: 0;
|
background: var(--nx-glass-fill);
|
||||||
line-height: 1;
|
-webkit-backdrop-filter: var(--nx-glass-blur);
|
||||||
|
backdrop-filter: var(--nx-glass-blur);
|
||||||
|
border: 1px solid var(--nx-glass-rim);
|
||||||
|
box-shadow: var(--nx-glass-shadow);
|
||||||
}
|
}
|
||||||
|
|
||||||
.app-brand__logo--static {
|
/* Full-bleed page: edge-to-edge glass bar with a bottom hairline. */
|
||||||
display: inline-block;
|
.app--shell:has(.pt-wall-shell) .app-brand {
|
||||||
|
--glass-inset: 0px;
|
||||||
|
padding-inline: 16px 18px;
|
||||||
}
|
}
|
||||||
|
.app--shell:has(.pt-wall-shell) .app-brand::before {
|
||||||
|
border-radius: 0;
|
||||||
|
border-width: 0 0 1px;
|
||||||
|
box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.08), 0 6px 18px rgb(0 0 0 / 0.30);
|
||||||
|
}
|
||||||
|
.app--shell:has(.pt-wall-shell) .app-brand::after { display: none; }
|
||||||
|
|
||||||
.app-brand__sep {
|
/* Specular rim on the capsule (same ring as the glass panels). */
|
||||||
width: 1px;
|
.app-brand::after {
|
||||||
height: 16px;
|
content: "";
|
||||||
background: rgba(255, 255, 255, 0.22);
|
position: absolute;
|
||||||
flex-shrink: 0;
|
inset: var(--glass-inset) var(--nx-gutter);
|
||||||
|
z-index: -1;
|
||||||
|
padding: 1px;
|
||||||
|
border-radius: 14px;
|
||||||
|
background: var(--nx-glass-specular);
|
||||||
|
-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
|
||||||
|
-webkit-mask-composite: xor;
|
||||||
|
mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
|
||||||
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.app-brand__start {
|
.app-brand__start {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 12px;
|
gap: 10px;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.app-brand__apps {
|
/* Brand: mark + wordmark, clickable everywhere (returns to the workbench). */
|
||||||
|
.app-brand__logo {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 9px;
|
||||||
|
height: 32px;
|
||||||
|
padding: 0 8px 0 4px;
|
||||||
|
margin: 0;
|
||||||
|
border: 0;
|
||||||
|
border-radius: var(--nx-radius);
|
||||||
|
background: transparent;
|
||||||
|
color: var(--nx-text-strong);
|
||||||
|
text-decoration: none;
|
||||||
|
cursor: pointer;
|
||||||
|
flex-shrink: 0;
|
||||||
|
transition: background 0.14s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-brand__logo:hover { background: rgb(255 255 255 / 0.06); }
|
||||||
|
.app-brand__logo:focus-visible { outline: none; box-shadow: var(--nx-ring); }
|
||||||
|
.app-brand__mark { display: block; flex-shrink: 0; filter: drop-shadow(0 2px 6px rgb(var(--nx-accent-rgb) / 0.35)); }
|
||||||
|
|
||||||
|
.app-brand__wordmark {
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: 650;
|
||||||
|
letter-spacing: 0.08em;
|
||||||
|
line-height: 1;
|
||||||
|
color: var(--nx-text-strong);
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-brand__crumb {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 6px;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-brand__sep {
|
||||||
|
width: 1px;
|
||||||
|
height: 18px;
|
||||||
|
margin-right: 4px;
|
||||||
|
background: var(--nx-line);
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app--shell .app-brand .app-brand__apps {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
width: 30px;
|
width: 30px;
|
||||||
|
min-width: 30px;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
border: none;
|
border: 0;
|
||||||
border-radius: 4px;
|
border-radius: var(--nx-radius-sm);
|
||||||
background: transparent;
|
background: transparent;
|
||||||
color: rgba(255, 255, 255, 0.88);
|
color: var(--nx-text-muted);
|
||||||
cursor: pointer;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.app-brand__apps:hover,
|
.app--shell .app-brand .app-brand__apps svg { width: 17px; height: 17px; }
|
||||||
.app-brand__apps:focus-visible {
|
|
||||||
background: rgb(var(--nx-accent-rgb) / 0.22);
|
.app--shell .app-brand .app-brand__apps:hover,
|
||||||
color: #fff;
|
.app--shell .app-brand .app-brand__apps:focus-visible {
|
||||||
|
background: var(--nx-accent-soft);
|
||||||
|
color: var(--nx-text-strong);
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.app-brand__module-title {
|
.app-brand__module-title {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 500;
|
font-weight: 600;
|
||||||
color: rgba(255, 255, 255, 0.92);
|
color: var(--nx-text);
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
letter-spacing: 0.02em;
|
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Right-side actions share one quiet button style. */
|
||||||
.app-brand__actions {
|
.app-brand__actions {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 8px;
|
gap: 6px;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.app-brand__actions-group {
|
.app-brand__divider {
|
||||||
|
width: 1px;
|
||||||
|
height: 18px;
|
||||||
|
margin: 0 4px;
|
||||||
|
background: var(--nx-line);
|
||||||
|
}
|
||||||
|
|
||||||
|
.app--shell .app-brand .app-brand__btn {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 6px;
|
gap: 7px;
|
||||||
|
height: 30px;
|
||||||
|
min-width: 0;
|
||||||
|
padding: 0 10px;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
border-radius: var(--nx-radius);
|
||||||
|
background: transparent;
|
||||||
|
color: var(--nx-text-muted);
|
||||||
|
font: 500 12px/1 var(--nx-font-sans);
|
||||||
|
white-space: nowrap;
|
||||||
|
box-shadow: none;
|
||||||
|
transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.app-brand__actions-sep {
|
.app--shell .app-brand .app-brand__btn:hover,
|
||||||
width: 1px;
|
.app--shell .app-brand .app-brand__btn[aria-expanded="true"] {
|
||||||
height: 14px;
|
background: rgb(255 255 255 / 0.08);
|
||||||
margin: 0 4px;
|
border-color: rgb(255 255 255 / 0.08);
|
||||||
background: rgba(255, 255, 255, 0.18);
|
color: var(--nx-text);
|
||||||
|
}
|
||||||
|
|
||||||
|
.app--shell .app-brand .app-brand__btn:focus-visible { outline: none; box-shadow: var(--nx-ring); }
|
||||||
|
|
||||||
|
/* Tasks: a count badge that lights up only while work is running. */
|
||||||
|
.app-brand__tasks-dot {
|
||||||
|
width: 6px;
|
||||||
|
height: 6px;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: var(--nx-text-faint);
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.app-brand__tasks-count {
|
||||||
|
min-width: 20px;
|
||||||
|
height: 18px;
|
||||||
|
padding: 0 6px;
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
border-radius: 999px;
|
||||||
|
background: rgb(255 255 255 / 0.06);
|
||||||
|
color: var(--nx-text-soft);
|
||||||
|
font: 600 11px/1 var(--nx-font-mono);
|
||||||
|
font-variant-numeric: tabular-nums;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-brand__tasks.is-busy .app-brand__tasks-dot {
|
||||||
|
background: var(--nx-accent);
|
||||||
|
box-shadow: 0 0 0 3px rgb(var(--nx-accent-rgb) / 0.2);
|
||||||
|
animation: app-brand-pulse 1.8s ease-in-out infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-brand__tasks.is-busy .app-brand__tasks-count {
|
||||||
|
background: rgb(var(--nx-accent-rgb) / 0.2);
|
||||||
|
color: var(--nx-accent-text);
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes app-brand-pulse {
|
||||||
|
50% { box-shadow: 0 0 0 5px rgb(var(--nx-accent-rgb) / 0); }
|
||||||
|
}
|
||||||
|
|
||||||
|
.app--shell .app-brand .app-brand__locale { gap: 5px; padding: 0 8px; letter-spacing: 0.04em; }
|
||||||
|
|
||||||
|
/* User menu */
|
||||||
|
.app--shell .app-brand .app-brand__user { gap: 8px; padding: 0 8px 0 4px; color: var(--nx-text-soft); }
|
||||||
|
|
||||||
|
.app-brand__avatar {
|
||||||
|
width: 22px;
|
||||||
|
height: 22px;
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: linear-gradient(135deg, var(--nx-accent-strong), #0ea5e9);
|
||||||
|
color: #fff;
|
||||||
|
font: 600 11px/1 var(--nx-font-sans);
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-brand__avatar--lg { width: 34px; height: 34px; font-size: 14px; }
|
||||||
|
|
||||||
|
.app-brand__user-name {
|
||||||
|
max-width: 120px;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-brand__chevron { color: var(--nx-text-faint); transition: transform 0.14s ease; }
|
||||||
|
.app-brand__user[aria-expanded="true"] .app-brand__chevron { transform: rotate(180deg); }
|
||||||
|
|
||||||
|
/* Popover renders in a portal, outside .app--shell. */
|
||||||
|
.app-brand__menu {
|
||||||
|
min-width: 220px;
|
||||||
|
padding: 6px;
|
||||||
|
border: 1px solid rgb(255 255 255 / 0.10);
|
||||||
|
border-radius: 14px;
|
||||||
|
background:
|
||||||
|
linear-gradient(180deg, rgb(255 255 255 / 0.08), rgb(255 255 255 / 0.02)),
|
||||||
|
rgb(var(--nx-ink-rgb) / 0.62);
|
||||||
|
-webkit-backdrop-filter: blur(24px) saturate(180%);
|
||||||
|
backdrop-filter: blur(24px) saturate(180%);
|
||||||
|
box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.18), var(--nx-shadow-pop);
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-brand__menu-head {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
padding: 8px 8px 12px;
|
||||||
|
margin-bottom: 4px;
|
||||||
|
border-bottom: 1px solid var(--nx-line-soft);
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-brand__menu-id { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
|
||||||
|
.app-brand__menu-id strong { font-size: 13px; font-weight: 600; color: var(--nx-text-strong); overflow: hidden; text-overflow: ellipsis; }
|
||||||
|
.app-brand__menu-id span { font-size: 11px; color: var(--nx-text-faint); }
|
||||||
|
|
||||||
|
.app-brand__menu .app-brand__menu-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
font-size: 13px;
|
||||||
|
color: var(--nx-text-soft);
|
||||||
|
border-radius: var(--nx-radius-sm);
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-brand__menu .app-brand__menu-item[data-focus-visible] { box-shadow: var(--nx-ring); }
|
||||||
|
|
||||||
|
.app-brand__menu .app-brand__menu-item[data-hovered],
|
||||||
|
.app-brand__menu .app-brand__menu-item[data-focused] {
|
||||||
|
background: rgb(var(--nx-bad-rgb) / 0.12);
|
||||||
|
color: var(--nx-bad-text);
|
||||||
|
}
|
||||||
|
|
||||||
.app-main {
|
.app-main {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
padding: 20px 28px 32px;
|
padding: 20px 28px 32px;
|
||||||
|
|
@ -108,35 +324,23 @@
|
||||||
color: var(--nm-text, var(--nx-line));
|
color: var(--nm-text, var(--nx-line));
|
||||||
}
|
}
|
||||||
|
|
||||||
.app--shell .app-brand .conn-pill.conn-pill--tasks::before {
|
|
||||||
content: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.app--shell .app-brand .conn-pill--tasks {
|
|
||||||
display: inline-flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 6px;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.app-brand__tasks-count { display: none; }
|
|
||||||
|
|
||||||
.app--shell .app-brand .conn-pill--user .chip__label {
|
|
||||||
max-width: 110px;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 640px) {
|
@media (max-width: 640px) {
|
||||||
.app--shell .app-brand { padding-inline: 12px; gap: 8px; }
|
.app--shell { --nx-gutter: 16px; }
|
||||||
.app-brand__start { gap: 8px; }
|
.app-brand { --glass-inset: 4px; gap: 8px; }
|
||||||
.app-brand__actions-group { gap: 4px; }
|
.app-brand__start { gap: 6px; }
|
||||||
.app--shell .app-brand .conn-pill--user .chip__label { max-width: 64px; }
|
.app-brand__actions { gap: 2px; }
|
||||||
|
.app-brand__wordmark,
|
||||||
|
.app-brand__user-name,
|
||||||
|
.app-brand__tasks-text,
|
||||||
|
.app-brand__divider { display: none; }
|
||||||
|
.app--shell .app-brand .app-brand__btn { padding-inline: 7px; }
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 480px) {
|
/* No backdrop blur (or the user asked for less transparency): solid glass. */
|
||||||
.app-brand__tasks-text { display: none; }
|
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
|
||||||
.app-brand__tasks-count { display: inline; font-variant-numeric: tabular-nums; }
|
.app-brand::before, .app-brand__menu { background-color: var(--nx-surface-2); }
|
||||||
.app--shell .app-brand .conn-pill--tasks { padding-inline: 7px; }
|
}
|
||||||
|
|
||||||
|
@media (prefers-reduced-transparency: reduce) {
|
||||||
|
.app-brand::before, .app-brand__menu { background: var(--nx-surface-2); backdrop-filter: none; -webkit-backdrop-filter: none; }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,179 +1,211 @@
|
||||||
/* Desktop console: launcher and network on the left, tasks on the right,
|
/* Desktop console. Top: resource strip. Below, left: the module launcher (it
|
||||||
with a single resource strip below. Page geometry has one owning layer. */
|
takes all leftover height — the main area) over the network panel; right:
|
||||||
|
the task list, sized by that column (it scrolls, never stretches empty).
|
||||||
|
One spacing rhythm: 16px between panels, 20px inside them. */
|
||||||
.app--shell .app-main:has(> .workbench) {
|
.app--shell .app-main:has(> .workbench) {
|
||||||
padding: 28px 32px 32px;
|
padding: 20px var(--nx-gutter) 32px;
|
||||||
background: var(--nx-bg);
|
/* Ambient backdrop comes from theme/glass.css. */
|
||||||
}
|
}
|
||||||
|
|
||||||
.workbench { width: 100%; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
|
.workbench {
|
||||||
.wb-panel { min-width: 0; border: 1px solid var(--nx-line-soft); border-radius: var(--nx-radius-lg); background: var(--nx-surface-1); }
|
--wb-gap: 16px; --wb-pad: 20px; --wb-tile-h: 112px; --wb-donut: 92px;
|
||||||
.wb-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-bottom: 4px; }
|
width: 100%; min-width: 0; display: flex; flex-direction: column; gap: var(--wb-gap);
|
||||||
.wb-head__title-row, .wb-head__actions { display: flex; align-items: center; gap: 16px; }
|
min-height: calc(100vh - var(--nx-header-h, 48px) - 52px); /* 52px = main padding (top + bottom) */
|
||||||
.wb-head__title { margin: 0; color: var(--nx-text-strong); font-size: 24px; font-weight: 600; line-height: 1.5; }
|
}
|
||||||
.wb-head__updated { color: var(--nx-text-faint); font-size: 12px; }
|
.wb-panel:not(.wb-rail) { position: relative; }
|
||||||
.wb-head__health { display: inline-flex; align-items: center; gap: 6px; color: var(--nx-text-muted); font-size: 12px; }
|
.wb-panel {
|
||||||
.wb-head__health.is-ok { color: var(--nx-ok); }
|
min-width: 0; border: 1px solid var(--nx-glass-rim); border-radius: 16px;
|
||||||
.wb-head__health.is-busy { color: var(--nx-warn); }
|
background: var(--nx-glass-fill);
|
||||||
.wb-head__health-dot, .wb-fleet__live > span { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
|
-webkit-backdrop-filter: var(--nx-glass-blur); backdrop-filter: var(--nx-glass-blur);
|
||||||
.app--shell .app-main .wb-refresh { height: 32px; gap: 6px; background: transparent; border-color: var(--nx-line); color: var(--nx-text-muted); font-size: 12px; box-shadow: none; }
|
box-shadow: var(--nx-glass-shadow);
|
||||||
.wb-refresh__icon { display: inline-flex; }
|
}
|
||||||
.wb-refresh__icon.is-spinning { animation: wb-spin 1s linear infinite; }
|
.wb-panel-title, .wb-rail__title { margin: 0; color: var(--nx-text); font-size: 14px; font-weight: 600; line-height: 1.5; }
|
||||||
@keyframes wb-spin { to { transform: rotate(360deg); } }
|
|
||||||
|
|
||||||
.wb-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: stretch; }
|
|
||||||
.wb-main { min-width: 0; display: flex; flex-direction: column; gap: 24px; }
|
|
||||||
.wb-side { min-width: 0; display: flex; }
|
|
||||||
.wb-panel-title, .wb-fleet__title, .wb-rail__title { margin: 0; color: var(--nx-text); font-size: 15px; font-weight: 600; line-height: 1.5; }
|
|
||||||
|
|
||||||
/* Five primary destinations, followed by one quiet system toolbar. */
|
.wb-body { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 320px; grid-template-rows: minmax(min-content, 1fr) auto; gap: var(--wb-gap); }
|
||||||
.wb-modules { padding: 24px; display: flex; flex-direction: column; gap: 20px; }
|
.wb-modules { grid-column: 1; grid-row: 1; }
|
||||||
.wb-modules__head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
|
.wb-side { grid-column: 2; grid-row: 1 / span 2; position: relative; min-width: 0; }
|
||||||
.wb-search { display: flex; align-items: center; gap: 8px; width: 230px; height: 32px; padding: 0 10px; border: 1px solid var(--nx-line-soft); border-radius: var(--nx-radius-sm); color: var(--nx-text-faint); background: var(--nx-field); }
|
.wb-fleet { grid-column: 1; grid-row: 2; }
|
||||||
.wb-search:focus-within { border-color: var(--nx-accent); box-shadow: var(--nx-ring); }
|
|
||||||
.app--shell .app-main .wb-search input { width: 100%; min-width: 0; padding: 0; border: 0; outline: none; border-radius: 0; box-shadow: none; background: transparent; color: var(--nx-text); font: 12px var(--nx-font-sans); }
|
/* Modules: one row of primary tiles, then a quiet row of admin links. */
|
||||||
.wb-search input::-webkit-search-cancel-button { display: none; }
|
.wb-modules { padding: var(--wb-pad); display: flex; flex-direction: column; gap: 14px; }
|
||||||
.wb-search svg { width: 15px; height: 15px; flex-shrink: 0; }
|
/* Fixed-size tiles fill rows in order; the panel's spare height is room for new modules. */
|
||||||
.app--shell .app-main .wb-search__clear { width: 22px; height: 24px; min-width: 0; padding: 0; border: 0; background: transparent; color: var(--nx-text-muted); box-shadow: none; }
|
.wb-section--operations { display: grid; grid-template-columns: repeat(auto-fill, minmax(max(88px, 16%), 1fr)); grid-auto-rows: var(--wb-tile-h); gap: 12px; }
|
||||||
.wb-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
|
|
||||||
.app--shell .app-main .wb-tile {
|
.app--shell .app-main .wb-tile {
|
||||||
width: 100%; height: auto; min-height: 120px; padding: 16px 10px;
|
width: 100%; height: auto; min-height: var(--wb-tile-h); padding: 12px 16px; margin: 0;
|
||||||
display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
|
display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
|
||||||
border: 1px solid transparent; border-radius: var(--nx-radius); background: transparent;
|
border: 1px solid rgb(255 255 255 / .07); border-radius: 12px;
|
||||||
color: var(--nx-text); text-align: center; white-space: normal; box-shadow: none;
|
background: linear-gradient(180deg, rgb(255 255 255 / .06), rgb(255 255 255 / .015));
|
||||||
transition: background .15s, border-color .15s;
|
color: var(--nx-text); text-align: left; white-space: nowrap;
|
||||||
|
box-shadow: inset 0 1px 0 rgb(255 255 255 / .10);
|
||||||
|
transition: background .2s, border-color .2s, box-shadow .2s, transform .2s;
|
||||||
|
}
|
||||||
|
.app--shell .app-main .wb-tile:hover {
|
||||||
|
background: linear-gradient(180deg, rgb(255 255 255 / .10), rgb(255 255 255 / .03)), rgb(var(--wb-tone-rgb, var(--nx-accent-rgb)) / .08);
|
||||||
|
border-color: rgb(var(--wb-tone-rgb, var(--nx-accent-rgb)) / .35);
|
||||||
|
box-shadow: inset 0 1px 0 rgb(255 255 255 / .18), 0 10px 28px rgb(var(--wb-tone-rgb, var(--nx-accent-rgb)) / .14);
|
||||||
|
transform: translateY(-2px);
|
||||||
}
|
}
|
||||||
.app--shell .app-main .wb-tile:hover { background: var(--nx-surface-2); border-color: var(--nx-line-soft); }
|
|
||||||
.app--shell .app-main .wb-tile:focus-visible { box-shadow: var(--nx-ring); }
|
.app--shell .app-main .wb-tile:focus-visible { box-shadow: var(--nx-ring); }
|
||||||
.wb-tile__label { font-size: 15px; font-weight: 600; line-height: 1.5; color: var(--nx-text); }
|
.wb-tile__label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: 14px; font-weight: 600; color: var(--nx-text-strong); }
|
||||||
.wb-card__icon { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: var(--nx-radius-lg); color: var(--nx-accent); background: var(--nx-accent-soft); flex-shrink: 0; }
|
.wb-tile--blue, .wb-card__icon--blue { --wb-tone-rgb: 96 165 250; }
|
||||||
.wb-card__icon svg { width: 24px; height: 24px; }
|
.wb-tile--green, .wb-card__icon--green { --wb-tone-rgb: 52 211 153; }
|
||||||
.wb-section--system { display: flex; align-items: center; gap: 28px; padding-top: 18px; border-top: 1px solid var(--nx-line-soft); }
|
.wb-tile--amber, .wb-card__icon--amber { --wb-tone-rgb: 251 191 36; }
|
||||||
.wb-section__title { margin: 0; font-size: 12px; font-weight: 400; color: var(--nx-text-faint); white-space: nowrap; }
|
.wb-tile--slate, .wb-card__icon--slate { --wb-tone-rgb: 148 163 184; }
|
||||||
.wb-section--system .wb-tiles { display: flex; flex-wrap: wrap; gap: 12px; }
|
.wb-card__icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--nx-radius-lg); color: rgb(var(--wb-tone-rgb, var(--nx-accent-rgb))); background: rgb(var(--wb-tone-rgb, var(--nx-accent-rgb)) / .14); flex-shrink: 0; }
|
||||||
.app--shell .app-main .wb-section--system .wb-tile { width: auto; min-height: 34px; flex-direction: row; gap: 8px; padding: 4px 10px; text-align: left; }
|
.wb-card__icon svg { width: 22px; height: 22px; }
|
||||||
.wb-section--system .wb-card__icon { width: 20px; height: 20px; border-radius: 0; background: transparent; color: var(--nx-text-muted); }
|
|
||||||
.wb-section--system .wb-card__icon svg { width: 16px; height: 16px; }
|
|
||||||
.wb-section--system .wb-tile__label { font-size: 13px; font-weight: 400; color: var(--nx-text-muted); }
|
|
||||||
.wb-modules__empty { padding: 40px 0; text-align: center; font-size: 13px; color: var(--nx-text-muted); }
|
|
||||||
.wb-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; border: 0; }
|
|
||||||
|
|
||||||
/* A single network panel; columns are separated by rules, not nested cards. */
|
.wb-section--system { margin-top: auto; display: flex; flex-wrap: wrap; gap: 4px; padding-top: 12px; border-top: 1px solid var(--nx-line-soft); }
|
||||||
.wb-fleet { padding: 24px; }
|
.app--shell .app-main .wb-section--system .wb-tile { width: auto; min-height: 30px; padding: 0 10px 0 6px; flex-direction: row; gap: 6px; border-color: transparent; background: transparent; }
|
||||||
.wb-fleet__head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
|
.app--shell .app-main .wb-section--system .wb-tile { box-shadow: none; }
|
||||||
.wb-fleet__live { display: inline-flex; align-items: center; gap: 6px; color: var(--nx-text-faint); font-size: 11px; }
|
.app--shell .app-main .wb-section--system .wb-tile:hover { background: rgb(255 255 255 / .06); border-color: transparent; box-shadow: none; transform: none; }
|
||||||
.wb-fleet__live > span { color: var(--nx-ok); }
|
.wb-section--system .wb-card__icon { width: 20px; height: 20px; border-radius: 0; background: transparent; color: var(--nx-text-faint); }
|
||||||
|
.wb-section--system .wb-card__icon svg { width: 15px; height: 15px; }
|
||||||
|
.wb-section--system .wb-tile__label { font-size: 13px; font-weight: 400; color: var(--nx-text-muted); }
|
||||||
|
.app--shell .app-main .wb-section--system .wb-tile:hover .wb-tile__label { color: var(--nx-text); }
|
||||||
|
|
||||||
|
/* Tasks: sized by the module panel beside it; the list scrolls. */
|
||||||
|
.wb-rail { position: absolute; inset: 0; padding: var(--wb-pad) var(--wb-pad) 8px; display: flex; flex-direction: column; min-height: 0; }
|
||||||
|
.wb-rail__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
|
||||||
|
.wb-rail__title { display: flex; align-items: center; gap: 8px; }
|
||||||
|
.wb-rail__count { min-width: 20px; height: 18px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: rgb(255 255 255 / .06); font: 600 11px var(--nx-font-mono); color: var(--nx-text-soft); }
|
||||||
|
.app--shell .app-main .wb-rail__all { height: 24px; min-height: 0; padding: 0 6px; border: 0; border-radius: var(--nx-radius-sm); background: transparent; color: var(--nx-accent); font-size: 12px; box-shadow: none; }
|
||||||
|
.app--shell .app-main .wb-rail__all:hover { background: var(--nx-accent-soft); }
|
||||||
|
.wb-rail__list { flex: 1; min-height: 0; list-style: none; padding: 0; margin: 8px -10px 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--nx-line) transparent; }
|
||||||
|
.app--shell .app-main .wb-rail__item { width: 100%; height: auto; margin: 0; padding: 9px 10px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; border: 0; border-radius: var(--nx-radius); background: transparent; color: var(--nx-text); box-shadow: none; font: inherit; text-align: left; cursor: pointer; }
|
||||||
|
.app--shell .app-main .wb-rail__item:hover { background: rgb(255 255 255 / .04); }
|
||||||
|
.app--shell .app-main .wb-rail__item:focus-visible { box-shadow: var(--nx-ring); }
|
||||||
|
.wb-rail__item-title { grid-column: 1; font-size: 13px; line-height: 1.5; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||||
|
.app--shell .app-main .wb-rail__item:hover .wb-rail__item-title { color: var(--nx-accent-text); }
|
||||||
|
.wb-rail__item-meta { grid-column: 1; display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12px; }
|
||||||
|
.wb-rail__time { grid-column: 2; grid-row: 1 / span 2; font: 11px var(--nx-font-mono); color: var(--nx-text-faint); }
|
||||||
|
.wb-rail__status { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; }
|
||||||
|
.wb-rail__status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
|
||||||
|
.wb-rail__status--running { color: var(--nx-accent); }
|
||||||
|
.wb-rail__status--ok { color: var(--nx-ok); }
|
||||||
|
.wb-rail__status--paused { color: var(--nx-warn); }
|
||||||
|
.wb-rail__status--stopped { color: var(--nx-bad); }
|
||||||
|
.wb-rail__status--other, .wb-rail__progress { color: var(--nx-text-muted); }
|
||||||
|
.wb-rail__progress { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||||
|
.wb-rail__empty { flex: 1; margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--nx-text-muted); font-size: 12px; text-align: center; }
|
||||||
|
.wb-rail__empty strong { font-weight: 500; }
|
||||||
|
.wb-rail__empty-icon, .wb-rail__empty-icon svg { display: inline-flex; width: 22px; height: 22px; color: var(--nx-ok); }
|
||||||
|
.wb-rail__empty--error > svg { color: var(--nx-warn); }
|
||||||
|
|
||||||
|
/* Network: three columns separated by rules. */
|
||||||
|
.wb-fleet { padding: var(--wb-pad); display: flex; flex-direction: column; }
|
||||||
.wb-fleet__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
.wb-fleet__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
||||||
.app--shell .app-main .wb-fleet__card {
|
.app--shell .app-main .wb-fleet__card {
|
||||||
width: 100%; max-width: none; height: auto; min-width: 0; margin: 0; padding: 0 24px;
|
width: 100%; max-width: none; height: auto; min-width: 0; margin: 0; padding: 0 28px;
|
||||||
display: flex; flex-direction: column; gap: 20px;
|
display: flex; flex-direction: column; gap: 18px;
|
||||||
border: 0; border-radius: 0; background: transparent; color: var(--nx-text); font: inherit; text-align: left; box-shadow: none;
|
border: 0; border-radius: 0; background: transparent; color: var(--nx-text); font: inherit; text-align: left; box-shadow: none;
|
||||||
}
|
}
|
||||||
.app--shell .app-main .wb-fleet__card:first-child { padding-left: 0; }
|
.app--shell .app-main .wb-fleet__card:first-child { padding-left: 0; }
|
||||||
.app--shell .app-main .wb-fleet__card:last-child { padding-right: 0; }
|
.app--shell .app-main .wb-fleet__card:last-child { padding-right: 0; }
|
||||||
.app--shell .app-main .wb-fleet__card + .wb-fleet__card { border-left: 1px solid var(--nx-line-soft); }
|
.app--shell .app-main .wb-fleet__card + .wb-fleet__card { border-left: 1px solid var(--nx-line-soft); }
|
||||||
.app--shell .app-main button.wb-fleet__card { cursor: pointer; }
|
.app--shell .app-main button.wb-fleet__card { cursor: pointer; }
|
||||||
.app--shell .app-main button.wb-fleet__card:hover:enabled .wb-fleet__card-label { color: var(--nx-accent); }
|
.app--shell .app-main button.wb-fleet__card:hover:enabled .wb-fleet__card-label { color: var(--nx-accent-text); }
|
||||||
.app--shell .app-main button.wb-fleet__card:focus-visible { border-radius: var(--nx-radius); box-shadow: var(--nx-ring); }
|
.app--shell .app-main button.wb-fleet__card:focus-visible { border-radius: var(--nx-radius); box-shadow: var(--nx-ring); }
|
||||||
.app--shell .app-main button.wb-fleet__card:disabled { cursor: default; opacity: .65; }
|
.app--shell .app-main button.wb-fleet__card:disabled { cursor: default; opacity: .65; }
|
||||||
.wb-fleet__card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
|
.wb-fleet__card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 21px; }
|
||||||
.wb-fleet__card-label { font-size: 13px; font-weight: 500; color: var(--nx-text-soft); }
|
.wb-fleet__card-label { font-size: 14px; font-weight: 600; color: var(--nx-text); }
|
||||||
.wb-fleet__card-badge { font-size: 11px; color: var(--nx-text-faint); white-space: nowrap; }
|
.wb-fleet__card-badge { font: 12px var(--nx-font-mono); color: var(--nx-text-faint); white-space: nowrap; }
|
||||||
.wb-fleet__viz { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 20px; align-items: center; }
|
.wb-fleet__card-badge.is-warn { color: var(--nx-warn); font-family: var(--nx-font-sans); }
|
||||||
.wb-fleet__donut { position: relative; width: 80px; height: 80px; border-radius: 50%; }
|
.wb-fleet__viz { display: grid; grid-template-columns: var(--wb-donut) minmax(0, 1fr); gap: 28px; align-items: center; }
|
||||||
.wb-fleet__donut-hole { position: absolute; inset: 14%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-radius: 50%; background: var(--nx-surface-1); }
|
/* Ring is masked (not covered by an opaque disc) so the glass shows through the hole. */
|
||||||
.wb-fleet__donut-value { font: 600 18px var(--nx-font-mono); color: var(--nx-text); }
|
.wb-fleet__donut { position: relative; width: var(--wb-donut); height: var(--wb-donut); border-radius: 50%; }
|
||||||
.wb-fleet__donut-unit { font-size: 9px; color: var(--nx-text-faint); }
|
.wb-fleet__donut-ring { position: absolute; inset: 0; border-radius: 50%; -webkit-mask: radial-gradient(farthest-side, transparent 85%, #000 calc(85% + 1px)); mask: radial-gradient(farthest-side, transparent 85%, #000 calc(85% + 1px)); }
|
||||||
.wb-fleet__rows { min-width: 0; display: flex; flex-direction: column; gap: 7px; }
|
.wb-fleet__donut-hole { position: absolute; inset: 13%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 50%; background: transparent; }
|
||||||
.wb-fleet__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; line-height: 1.5; color: var(--nx-text-muted); }
|
.wb-fleet__donut-value { font: 600 17px var(--nx-font-mono); color: var(--nx-text-strong); }
|
||||||
.wb-fleet__legend { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
|
.wb-fleet__donut-unit { font-size: 10px; color: var(--nx-text-faint); }
|
||||||
|
.wb-fleet__rows { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
|
||||||
|
.wb-fleet__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; line-height: 1.5; color: var(--nx-text-muted); }
|
||||||
|
.wb-fleet__legend { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
|
||||||
.wb-fleet__legend-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
.wb-fleet__legend-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||||
.wb-fleet__swatch { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; background: var(--nx-text-faint); }
|
.wb-fleet__swatch { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; background: var(--nx-text-faint); }
|
||||||
.wb-fleet__swatch.is-ok { background: var(--nx-ok); }
|
.wb-fleet__swatch.is-ok { background: var(--nx-ok); }
|
||||||
.wb-fleet__swatch.is-bad { background: var(--nx-bad); }
|
.wb-fleet__swatch.is-bad { background: var(--nx-bad); }
|
||||||
.wb-fleet__swatch.is-mid { background: var(--nx-accent); }
|
.wb-fleet__swatch.is-mid { background: var(--nx-accent); }
|
||||||
.wb-fleet__row strong { font: 500 12px var(--nx-font-mono); color: var(--nx-text-soft); }
|
.wb-fleet__row strong { font: 500 13px var(--nx-font-mono); color: var(--nx-text-soft); }
|
||||||
.wb-fleet__row strong.is-ok, .wb-fleet__sched-state.is-ok, .wb-fleet__foot em.is-ok { color: var(--nx-ok); }
|
.wb-fleet__row strong.is-ok, .wb-fleet__sched-state.is-ok { color: var(--nx-ok); }
|
||||||
.wb-fleet__row strong.is-bad { color: var(--nx-bad); }
|
.wb-fleet__row strong.is-bad { color: var(--nx-bad); }
|
||||||
.wb-fleet__row strong.is-mid { color: var(--nx-accent); }
|
.wb-fleet__row strong.is-mid { color: var(--nx-accent); }
|
||||||
.wb-fleet__row strong.is-muted { color: var(--nx-text-faint); }
|
.wb-fleet__row strong.is-muted, .wb-fleet__sched-state.is-muted { color: var(--nx-text-faint); }
|
||||||
.wb-fleet__card--sched .wb-fleet__viz { display: block; }
|
.wb-fleet__card--sched .wb-fleet__viz { display: flex; align-items: center; min-height: var(--wb-donut); }
|
||||||
.wb-fleet__card--sched .wb-fleet__rows { gap: 0; }
|
.wb-fleet__card--sched .wb-fleet__rows { flex: 1; }
|
||||||
.app--shell .app-main button.wb-fleet__row--sched { width: 100%; min-height: 28px; height: auto; margin: 0; padding: 3px 0; display: grid; grid-template-columns: minmax(0, 1fr) 34px 42px; gap: 12px; border: 0; border-radius: 4px; background: transparent; box-shadow: none; color: var(--nx-text-muted); font: 12px var(--nx-font-sans); text-align: left; cursor: pointer; }
|
.wb-fleet__card--sched .wb-fleet__rows { gap: 2px; }
|
||||||
.app--shell .app-main button.wb-fleet__row--sched:hover { color: var(--nx-text); background: var(--nx-accent-soft); }
|
.app--shell .app-main button.wb-fleet__row--sched { width: 100%; min-height: 28px; height: auto; margin: 0; padding: 2px 8px; display: grid; grid-template-columns: minmax(0, 1fr) 36px 44px; gap: 12px; border: 0; border-radius: var(--nx-radius-sm); background: transparent; box-shadow: none; color: var(--nx-text-muted); font: 13px var(--nx-font-sans); text-align: left; cursor: pointer; }
|
||||||
|
.wb-fleet__card--sched .wb-fleet__rows { margin: 0 -8px; }
|
||||||
|
.app--shell .app-main button.wb-fleet__row--sched:hover { color: var(--nx-text); background: rgb(255 255 255 / .04); }
|
||||||
.app--shell .app-main button.wb-fleet__row--sched:focus-visible { box-shadow: var(--nx-ring); }
|
.app--shell .app-main button.wb-fleet__row--sched:focus-visible { box-shadow: var(--nx-ring); }
|
||||||
.wb-fleet__sched-state, .wb-fleet__sched-age { font: 11px var(--nx-font-mono); }
|
.wb-fleet__sched-state, .wb-fleet__sched-age { font: 12px var(--nx-font-mono); }
|
||||||
.wb-fleet__sched-age { color: var(--nx-text-faint); text-align: right; }
|
.wb-fleet__sched-age { color: var(--nx-text-faint); text-align: right; }
|
||||||
.wb-fleet__foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; margin-top: auto; font-size: 10px; line-height: 1.6; color: var(--nx-text-faint); }
|
|
||||||
.wb-fleet__foot em { color: var(--nx-text-muted); font-style: normal; }
|
|
||||||
.wb-fleet__foot em.is-warn { color: var(--nx-warn); }
|
|
||||||
|
|
||||||
/* Tasks are one continuous list, with no card inside a card. */
|
/* Resources: a single quiet strip. */
|
||||||
.wb-rail { width: 100%; padding: 24px; display: flex; flex-direction: column; }
|
.wb-runtime { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr) auto; gap: 32px; align-items: center; padding: 16px var(--wb-pad); }
|
||||||
.wb-rail__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
|
.wb-runtime__head { display: flex; align-items: center; gap: 8px; }
|
||||||
.wb-rail__title { display: flex; align-items: center; gap: 8px; }
|
.wb-runtime__head > svg { width: 16px; height: 16px; color: var(--nx-accent); flex-shrink: 0; }
|
||||||
.wb-rail__count { font: 12px var(--nx-font-mono); color: var(--nx-text-faint); }
|
.wb-runtime__group { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
|
||||||
.app--shell .app-main .wb-rail__all { height: 24px; min-height: 0; padding: 0; border: 0; background: transparent; color: var(--nx-accent); font-size: 11px; box-shadow: none; }
|
.wb-runtime__group--capacity { padding-left: 28px; border-left: 1px solid var(--nx-line-soft); }
|
||||||
.wb-rail__list { list-style: none; padding: 0; margin: 18px 0 0; max-height: 510px; overflow-y: auto; }
|
.wb-runtime .wb-stat { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: center; }
|
||||||
.wb-rail__list li + li { border-top: 1px solid var(--nx-line-soft); }
|
.wb-stat__label { font-size: 12px; color: var(--nx-text-muted); white-space: nowrap; }
|
||||||
.app--shell .app-main .wb-rail__item { width: 100%; height: auto; margin: 0; padding: 18px 0; display: flex; flex-direction: column; align-items: flex-start; gap: 9px; border: 0; border-radius: 0; background: transparent; color: var(--nx-text); box-shadow: none; font: inherit; text-align: left; cursor: pointer; }
|
.wb-stat__value { font: 12px var(--nx-font-mono); font-variant-numeric: tabular-nums; color: var(--nx-text-soft); white-space: nowrap; }
|
||||||
.app--shell .app-main .wb-rail__item:hover .wb-rail__item-title { color: var(--nx-accent); }
|
.wb-stat__track { grid-column: 1 / -1; width: 100%; height: 4px; overflow: hidden; border-radius: 999px; background: var(--nx-line-soft); }
|
||||||
.app--shell .app-main .wb-rail__item:focus-visible { border-radius: var(--nx-radius-sm); box-shadow: var(--nx-ring); }
|
.wb-stat__fill { display: block; height: 100%; border-radius: inherit; background: var(--nx-accent); transition: width .4s ease; }
|
||||||
.wb-rail__item-title { font-size: 13px; line-height: 1.6; font-weight: 500; overflow-wrap: anywhere; }
|
|
||||||
.wb-rail__item-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; font-size: 12px; }
|
|
||||||
.wb-rail__status { display: inline-flex; align-items: center; gap: 5px; }
|
|
||||||
.wb-rail__status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
|
|
||||||
.wb-rail__status--running { color: var(--nx-accent); }
|
|
||||||
.wb-rail__status--ok { color: var(--nx-ok); }
|
|
||||||
.wb-rail__status--paused { color: var(--nx-warn); }
|
|
||||||
.wb-rail__status--stopped { color: var(--nx-bad); }
|
|
||||||
.wb-rail__status--other, .wb-rail__progress { color: var(--nx-text-muted); }
|
|
||||||
.wb-rail__time { font-size: 11px; color: var(--nx-text-faint); }
|
|
||||||
.wb-rail__empty { margin: auto 0; padding: 40px 0; display: flex; flex-direction: column; align-items: center; gap: 14px; color: var(--nx-text-muted); font-size: 12px; text-align: center; }
|
|
||||||
.wb-rail__empty strong { font-weight: 500; }
|
|
||||||
.wb-rail__empty-icon, .wb-rail__empty-icon svg { display: inline-flex; width: 24px; height: 24px; color: var(--nx-ok); }
|
|
||||||
.wb-rail__empty--error > svg { color: var(--nx-warn); }
|
|
||||||
|
|
||||||
/* Resource telemetry is subordinate to the work area. */
|
|
||||||
.wb-runtime { display: grid; grid-template-columns: 110px minmax(0, 1fr) minmax(0, 1fr) 100px; gap: 24px; align-items: center; padding: 20px 24px; }
|
|
||||||
.wb-runtime__head { grid-column: 1; grid-row: 1; }
|
|
||||||
.wb-runtime__head > svg { display: none; }
|
|
||||||
.wb-runtime__group { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 22px; }
|
|
||||||
.wb-runtime__group--host { grid-column: 2; grid-row: 1; }
|
|
||||||
.wb-runtime__group--capacity { grid-column: 3; grid-row: 1; padding-left: 24px; border-left: 1px solid var(--nx-line-soft); }
|
|
||||||
.wb-runtime__group h3 { grid-column: 1 / -1; margin: 0; font-size: 11px; font-weight: 400; color: var(--nx-text-faint); }
|
|
||||||
.wb-runtime .wb-stat { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: center; padding: 0; background: transparent; border: 0; box-shadow: none; }
|
|
||||||
.wb-stat__label { font-size: 11px; color: var(--nx-text-muted); }
|
|
||||||
.wb-stat__value { font: 11px var(--nx-font-mono); font-variant-numeric: tabular-nums; color: var(--nx-text-soft); white-space: nowrap; }
|
|
||||||
.wb-stat__track { grid-column: 1 / -1; width: 100%; height: 2px; overflow: hidden; background: var(--nx-line-soft); }
|
|
||||||
.wb-stat__fill { display: block; height: 100%; background: var(--nx-accent); }
|
|
||||||
.wb-stat.is-high .wb-stat__fill { background: var(--nx-warn); }
|
.wb-stat.is-high .wb-stat__fill { background: var(--nx-warn); }
|
||||||
.wb-stat.is-muted .wb-stat__value { color: var(--nx-text-faint); }
|
.wb-stat.is-muted .wb-stat__value { color: var(--nx-text-faint); }
|
||||||
.wb-runtime__foot { grid-column: 4; grid-row: 1; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; font-size: 10px; color: var(--nx-text-faint); }
|
.wb-runtime__foot { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 11px; color: var(--nx-text-faint); }
|
||||||
.wb-runtime__foot strong { color: var(--nx-text-muted); font: 12px var(--nx-font-mono); }
|
.wb-runtime__foot strong { color: var(--nx-text-soft); font: 600 13px var(--nx-font-mono); }
|
||||||
.wb-runtime__error { grid-column: 1 / -1; grid-row: 2; margin: 0; font-size: 12px; color: var(--nx-warn); }
|
.wb-runtime__error { grid-column: 1 / -1; margin: 0; font-size: 12px; color: var(--nx-warn); }
|
||||||
|
|
||||||
|
@media (min-height: 860px) and (min-width: 1024px) {
|
||||||
|
.workbench { --wb-gap: 20px; --wb-pad: 24px; --wb-donut: 104px; }
|
||||||
|
.workbench { --wb-tile-h: 124px; }
|
||||||
|
.wb-fleet__rows { gap: 12px; }
|
||||||
|
.wb-fleet__card--sched .wb-fleet__rows { gap: 6px; }
|
||||||
|
.wb-fleet__row { font-size: 14px; }
|
||||||
|
.wb-runtime { padding-block: 20px; }
|
||||||
|
}
|
||||||
|
|
||||||
@media (min-width: 1800px) {
|
@media (min-width: 1800px) {
|
||||||
.app--shell .app-main:has(> .workbench) { padding: 32px 40px; }
|
.wb-body { grid-template-columns: minmax(0, 1fr) 380px; }
|
||||||
.wb-body { grid-template-columns: minmax(0, 1fr) 360px; }
|
|
||||||
.wb-modules, .wb-fleet, .wb-rail { padding: 28px; }
|
|
||||||
.app--shell .app-main .wb-tile { min-height: 132px; }
|
|
||||||
.wb-tile__label { font-size: 16px; }
|
|
||||||
.wb-fleet__viz { grid-template-columns: 88px minmax(0, 1fr); }
|
|
||||||
.wb-fleet__donut { width: 88px; height: 88px; }
|
|
||||||
.wb-fleet__donut-value { font-size: 20px; }
|
|
||||||
.wb-runtime { grid-template-columns: 130px minmax(0, 1fr) minmax(0, 1fr) 120px; }
|
|
||||||
.wb-stat__label, .wb-stat__value { font-size: 12px; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 1399px) {
|
@media (max-width: 1279px) {
|
||||||
.wb-body { grid-template-columns: minmax(0, 1fr) 290px; gap: 20px; }
|
.wb-body { grid-template-columns: minmax(0, 1fr) 280px; }
|
||||||
.wb-modules, .wb-fleet, .wb-rail { padding: 20px; }
|
.app--shell .app-main .wb-fleet__card { padding-inline: 18px; }
|
||||||
.app--shell .app-main .wb-fleet__card { padding-inline: 16px; }
|
.wb-fleet__viz { gap: 16px; }
|
||||||
.wb-fleet__viz { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; }
|
.app--shell .app-main .wb-section--operations .wb-tile { padding-inline: 10px; }
|
||||||
.wb-fleet__donut { width: 64px; height: 64px; }
|
.wb-section--operations .wb-tile__label { font-size: 14px; }
|
||||||
.wb-fleet__donut-value { font-size: 16px; }
|
.wb-runtime { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 28px; }
|
||||||
.wb-runtime { grid-template-columns: 100px minmax(0, 1fr) minmax(0, 1fr); }
|
.wb-runtime__head, .wb-runtime__foot { display: none; }
|
||||||
.wb-runtime__foot { display: none; }
|
}
|
||||||
.wb-runtime__group { gap: 12px; }
|
|
||||||
.wb-runtime .wb-stat { grid-template-columns: 1fr; }
|
@media (max-width: 1023px) {
|
||||||
|
.workbench { min-height: 0; }
|
||||||
|
.wb-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
|
||||||
|
.wb-section--operations { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); grid-auto-rows: auto; }
|
||||||
|
.workbench { --wb-tile-h: 96px; }
|
||||||
|
.wb-side { grid-column: 1; grid-row: auto; }
|
||||||
|
.wb-fleet { grid-row: auto; }
|
||||||
|
.wb-rail { position: static; max-height: 360px; }
|
||||||
|
.wb-fleet__grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
|
||||||
|
.app--shell .app-main .wb-fleet__card { padding: 0; }
|
||||||
|
.app--shell .app-main .wb-fleet__card + .wb-fleet__card { padding-top: 20px; border-left: 0; border-top: 1px solid var(--nx-line-soft); }
|
||||||
|
.wb-runtime { grid-template-columns: minmax(0, 1fr); }
|
||||||
|
.wb-runtime__group--capacity { padding-left: 0; border-left: 0; }
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 640px) {
|
||||||
|
.app--shell .app-main:has(> .workbench) { padding: 16px var(--nx-gutter); }
|
||||||
|
.workbench { --wb-pad: 16px; }
|
||||||
|
.wb-section--operations { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
||||||
|
}
|
||||||
|
|
||||||
|
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
|
||||||
|
.wb-panel { background: var(--nx-surface-1); }
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-reduced-transparency: reduce) {
|
||||||
|
.wb-panel { background: var(--nx-surface-1); backdrop-filter: none; -webkit-backdrop-filter: none; }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
235
web/src/styles/theme/glass.css
Normal file
235
web/src/styles/theme/glass.css
Normal file
|
|
@ -0,0 +1,235 @@
|
||||||
|
/*
|
||||||
|
* Liquid-glass layer, applied across pages. Loaded LAST (after theme.css), so
|
||||||
|
* equal-specificity selectors here win. Tokens live in theme/tokens.css.
|
||||||
|
*
|
||||||
|
* 1. One ambient backdrop for the whole app; page roots go transparent.
|
||||||
|
* 2. Panels/cards: full glass (translucent fill + blur + rim + specular).
|
||||||
|
* 3. Inside panels (tables, KPI strips, tag cards): a darker translucent
|
||||||
|
* layer WITHOUT its own blur, so dense text stays readable.
|
||||||
|
* 4. Sidebar pages (network / audit / topology / WebCRT): the side nav and
|
||||||
|
* the work area float as rounded glass panels on a 16px gutter, lined up
|
||||||
|
* with the header capsule (--nx-gutter, set in layout/app-shell.css).
|
||||||
|
*
|
||||||
|
* Working surfaces stay solid on purpose: the WebCRT terminal, the topology
|
||||||
|
* canvas and the traffic wall.
|
||||||
|
*
|
||||||
|
* Note: backdrop-filter makes an element the containing block for
|
||||||
|
* position:fixed descendants. Menus are portaled to .network-main or <body>
|
||||||
|
* (never glassed); panels holding a pseudo-fullscreen element drop the blur.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* ------------------------------------------------------------- 1. Backdrop */
|
||||||
|
.app--shell {
|
||||||
|
/* Black-blue wallpaper, all hues 200-215deg (never indigo). Clear glass needs
|
||||||
|
something to look through, so there is texture: a faint network dot grid,
|
||||||
|
two light streaks, and a few defined color pools. */
|
||||||
|
background:
|
||||||
|
radial-gradient(circle, rgb(147 197 253 / 0.10) 1px, transparent 1.6px) 0 0 / 24px 24px,
|
||||||
|
linear-gradient(118deg, transparent 38%, rgb(56 152 255 / 0.10) 46%, transparent 54%),
|
||||||
|
linear-gradient(118deg, transparent 62%, rgb(34 180 230 / 0.07) 67%, transparent 72%),
|
||||||
|
radial-gradient(34% 44% at 6% 10%, rgb(20 110 230 / 0.42), transparent 62%),
|
||||||
|
radial-gradient(28% 36% at 94% 6%, rgb(6 150 210 / 0.26), transparent 62%),
|
||||||
|
radial-gradient(40% 46% at 58% 64%, rgb(14 84 180 / 0.34), transparent 64%),
|
||||||
|
radial-gradient(30% 40% at 10% 96%, rgb(4 120 175 / 0.28), transparent 62%),
|
||||||
|
radial-gradient(28% 38% at 98% 98%, rgb(16 100 210 / 0.24), transparent 62%),
|
||||||
|
linear-gradient(140deg, #030a16 0%, #05132a 40%, #041022 72%, #020a14 100%);
|
||||||
|
background-attachment: fixed;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app--shell .app-main,
|
||||||
|
.app--shell .app-main:has(> .workbench),
|
||||||
|
.app--shell .network-shell,
|
||||||
|
.app--shell .network-main,
|
||||||
|
.app--shell .ne-page,
|
||||||
|
.app--shell .ume-page,
|
||||||
|
.app--shell .system-page,
|
||||||
|
.app--shell .topo-page,
|
||||||
|
.app--shell .webcrt-shell {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* --------------------------------------------------------------- 2. Panels */
|
||||||
|
.app--shell .network-main > .panel,
|
||||||
|
.app--shell .network-main .page-stack > .panel,
|
||||||
|
.app--shell .network-main > .nm-page-panel,
|
||||||
|
.app--shell .app-main .card,
|
||||||
|
.app--shell .app-main .panel {
|
||||||
|
border: 1px solid var(--nx-glass-rim);
|
||||||
|
border-radius: 16px;
|
||||||
|
background: var(--nx-glass-fill);
|
||||||
|
-webkit-backdrop-filter: var(--nx-glass-blur);
|
||||||
|
backdrop-filter: var(--nx-glass-blur);
|
||||||
|
box-shadow: var(--nx-glass-shadow);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Specular rim: a 1px ring painted with --nx-glass-specular (bright top-left
|
||||||
|
and bottom-right, like light on a curved glass edge), masked to the border. */
|
||||||
|
:where(.app--shell .app-main) :is(.panel, .card),
|
||||||
|
:where(.app--shell) :is(.network-nav, .topo-sidebar, .webcrt-sidebar, .topo-main, .webcrt-main) {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app--shell .app-main :is(.panel, .card)::before,
|
||||||
|
.app--shell .wb-panel::before,
|
||||||
|
.app--shell :is(.network-nav, .topo-sidebar, .webcrt-sidebar, .topo-main, .webcrt-main)::before {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
z-index: 2;
|
||||||
|
padding: 1px;
|
||||||
|
border-radius: inherit;
|
||||||
|
background: var(--nx-glass-specular);
|
||||||
|
-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
|
||||||
|
-webkit-mask-composite: xor;
|
||||||
|
mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* A panel nested in a panel: no second blur or rim, just a lighter sheet. */
|
||||||
|
.app--shell .app-main :is(.panel, .card) :is(.panel, .card)::before { display: none; }
|
||||||
|
|
||||||
|
.app--shell .app-main :is(.panel, .card) :is(.panel, .card) {
|
||||||
|
background: rgb(255 255 255 / 0.03);
|
||||||
|
-webkit-backdrop-filter: none;
|
||||||
|
backdrop-filter: none;
|
||||||
|
box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.06);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Pseudo-fullscreen children are position:fixed; keep them out of the glass trap. */
|
||||||
|
.app--shell .app-main :is(.panel, .card):has(.is-fullscreen) {
|
||||||
|
-webkit-backdrop-filter: none;
|
||||||
|
backdrop-filter: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ------------------------------------------------- 3. Content inside panels */
|
||||||
|
.app--shell :is(.app-main, .app-heroui-modal) .pt-list-table-wrap {
|
||||||
|
border: 1px solid rgb(255 255 255 / 0.06);
|
||||||
|
border-radius: 12px;
|
||||||
|
background: rgb(2 8 18 / 0.30);
|
||||||
|
box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.04);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* theme.css paints table headers solid with !important; match it to override. */
|
||||||
|
.app--shell .app-main .pt-list-table thead th,
|
||||||
|
.app--shell .app-main .data-table thead th {
|
||||||
|
background: rgb(255 255 255 / 0.045) !important;
|
||||||
|
border-bottom-color: rgb(255 255 255 / 0.10);
|
||||||
|
}
|
||||||
|
|
||||||
|
.app--shell .app-main .pt-list-kpis,
|
||||||
|
.app--shell .network-main .pt-list-kpis {
|
||||||
|
border: 1px solid rgb(255 255 255 / 0.06);
|
||||||
|
border-radius: 12px;
|
||||||
|
background: rgb(255 255 255 / 0.03);
|
||||||
|
box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.06);
|
||||||
|
}
|
||||||
|
|
||||||
|
.app--shell .app-main .ne-tag-card {
|
||||||
|
border-color: rgb(255 255 255 / 0.08);
|
||||||
|
border-radius: 12px;
|
||||||
|
background: linear-gradient(180deg, rgb(255 255 255 / 0.06), rgb(255 255 255 / 0.015));
|
||||||
|
box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.10);
|
||||||
|
transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app--shell .app-main .ne-tag-card:hover {
|
||||||
|
background: linear-gradient(180deg, rgb(255 255 255 / 0.09), rgb(255 255 255 / 0.03));
|
||||||
|
}
|
||||||
|
|
||||||
|
.app--shell .app-main .ne-tag-card.is-active {
|
||||||
|
border-color: rgb(var(--nx-accent-rgb) / 0.55);
|
||||||
|
background: linear-gradient(180deg, rgb(var(--nx-accent-rgb) / 0.16), rgb(var(--nx-accent-rgb) / 0.05));
|
||||||
|
box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.14), 0 6px 20px rgb(var(--nx-accent-rgb) / 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Topology workspace: rim + corners of a glass panel, but a dense fill and no
|
||||||
|
blur (its dialogs render inside it, and the canvas needs a calm ground). */
|
||||||
|
.app--shell .topo-main {
|
||||||
|
border: 1px solid var(--nx-glass-rim);
|
||||||
|
border-radius: 16px;
|
||||||
|
background: rgb(2 10 20 / 0.62);
|
||||||
|
box-shadow: var(--nx-glass-shadow);
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app--shell .topo-main .topo-browser { background: transparent; }
|
||||||
|
|
||||||
|
/* ------------------------------------------------------- 4. Sidebar pages */
|
||||||
|
/* Shells: inset by the gutter (4px top: the header strip already has its own). */
|
||||||
|
.app--shell .app-main:has(> .network-shell) {
|
||||||
|
padding: 4px var(--nx-gutter) var(--nx-gutter);
|
||||||
|
}
|
||||||
|
|
||||||
|
.app--shell .network-shell { gap: var(--nx-gutter); }
|
||||||
|
.app--shell .network-main { padding: 0 2px 8px; }
|
||||||
|
|
||||||
|
.app--shell .topo-page,
|
||||||
|
.app--shell .webcrt-shell {
|
||||||
|
padding: 4px var(--nx-gutter) var(--nx-gutter);
|
||||||
|
gap: var(--nx-gutter);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Side navs: floating glass columns. */
|
||||||
|
.app--shell .network-nav,
|
||||||
|
.app--shell .topo-sidebar,
|
||||||
|
.app--shell .webcrt-sidebar {
|
||||||
|
border: 1px solid var(--nx-glass-rim);
|
||||||
|
border-radius: 16px;
|
||||||
|
background:
|
||||||
|
linear-gradient(180deg, rgb(255 255 255 / 0.06), rgb(255 255 255 / 0.01)),
|
||||||
|
rgb(6 14 28 / 0.16);
|
||||||
|
-webkit-backdrop-filter: var(--nx-glass-blur);
|
||||||
|
backdrop-filter: var(--nx-glass-blur);
|
||||||
|
box-shadow: var(--nx-glass-shadow);
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* WebCRT terminal area: same rim and corners, solid fill (terminal readability). */
|
||||||
|
.app--shell .webcrt-main {
|
||||||
|
border: 1px solid var(--nx-glass-rim);
|
||||||
|
border-radius: 16px;
|
||||||
|
box-shadow: var(--nx-glass-shadow);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---------------------------------------------------- 5. Controls on glass */
|
||||||
|
/* Solid dark buttons/fields read as holes in the glass; make them translucent.
|
||||||
|
Scoped to .app-main only: dialogs keep their solid controls. */
|
||||||
|
:where(.app--shell .app-main) button.button--secondary {
|
||||||
|
background: rgb(255 255 255 / 0.08);
|
||||||
|
border-color: rgb(255 255 255 / 0.14);
|
||||||
|
box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.10);
|
||||||
|
}
|
||||||
|
|
||||||
|
:where(.app--shell .app-main) button.button--secondary:where(:hover:not(:disabled)) {
|
||||||
|
background: rgb(255 255 255 / 0.14);
|
||||||
|
border-color: rgb(var(--nx-accent-rgb) / 0.55);
|
||||||
|
}
|
||||||
|
|
||||||
|
:where(.app--shell .app-main) :is(button.button--tertiary, button.button--ghost) {
|
||||||
|
background: rgb(255 255 255 / 0.04);
|
||||||
|
border-color: rgb(255 255 255 / 0.12);
|
||||||
|
}
|
||||||
|
|
||||||
|
:where(.app--shell .app-main) :is(button.button--tertiary, button.button--ghost):where(:hover:not(:disabled)) {
|
||||||
|
background: rgb(255 255 255 / 0.10);
|
||||||
|
}
|
||||||
|
|
||||||
|
.app--shell :where(.app-main) :is(input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"]), select, textarea) {
|
||||||
|
background-color: rgb(2 8 18 / 0.30);
|
||||||
|
border-color: rgb(255 255 255 / 0.10);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* --------------------------------------------------------------- Fallbacks */
|
||||||
|
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
|
||||||
|
.app--shell .app-main :is(.panel, .card),
|
||||||
|
.app--shell :is(.network-nav, .topo-sidebar, .webcrt-sidebar) { background: var(--nx-surface-1); }
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-reduced-transparency: reduce) {
|
||||||
|
.app--shell .app-main :is(.panel, .card),
|
||||||
|
.app--shell :is(.network-nav, .topo-sidebar, .webcrt-sidebar) {
|
||||||
|
background: var(--nx-surface-1);
|
||||||
|
-webkit-backdrop-filter: none;
|
||||||
|
backdrop-filter: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -73,68 +73,6 @@ table,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------- 2. Header */
|
|
||||||
/* Height stays 48px: several pages use calc(100vh - 48px). */
|
|
||||||
.app--shell .app-brand {
|
|
||||||
background: linear-gradient(180deg, var(--nx-surface-2) 0%, var(--nx-surface-1) 100%);
|
|
||||||
border-bottom: 1px solid var(--nx-line);
|
|
||||||
box-shadow: 0 1px 0 rgb(var(--nx-accent-rgb) / 0.06);
|
|
||||||
}
|
|
||||||
|
|
||||||
.app--shell .app-brand__logo {
|
|
||||||
font-size: 16px;
|
|
||||||
font-weight: 800;
|
|
||||||
letter-spacing: 0.22em;
|
|
||||||
background: linear-gradient(90deg, #ffffff 0%, #9fcbff 100%);
|
|
||||||
-webkit-background-clip: text;
|
|
||||||
background-clip: text;
|
|
||||||
color: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
.app--shell .app-brand__sep {
|
|
||||||
background: var(--nx-line-strong);
|
|
||||||
}
|
|
||||||
|
|
||||||
.app--shell .app-brand__module-title {
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 600;
|
|
||||||
color: var(--nx-text);
|
|
||||||
}
|
|
||||||
|
|
||||||
.app--shell .app-brand .app-brand__apps {
|
|
||||||
border-radius: var(--nx-radius-sm);
|
|
||||||
color: var(--nx-text-muted);
|
|
||||||
}
|
|
||||||
|
|
||||||
.app--shell .app-brand .app-brand__apps:hover,
|
|
||||||
.app--shell .app-brand .app-brand__apps:focus-visible {
|
|
||||||
background: var(--nx-accent-soft);
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.app--shell .app-brand .conn-pill.conn-pill--on-brand,
|
|
||||||
.app--shell .app-brand .header-menu__trigger.header-menu__trigger--on-brand {
|
|
||||||
height: 26px;
|
|
||||||
border-radius: 999px;
|
|
||||||
border-color: var(--nx-line-strong);
|
|
||||||
background: rgb(255 255 255 / 0.05);
|
|
||||||
color: var(--nx-text-muted);
|
|
||||||
font-size: 12px;
|
|
||||||
transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.app--shell .app-brand .conn-pill.conn-pill--on-brand.conn-pill--user {
|
|
||||||
color: var(--nx-text);
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
|
||||||
|
|
||||||
.app--shell .app-brand .conn-pill.conn-pill--on-brand:hover,
|
|
||||||
.app--shell .app-brand .header-menu__trigger.header-menu__trigger--on-brand:hover {
|
|
||||||
background: var(--nx-accent-soft);
|
|
||||||
border-color: rgb(var(--nx-accent-rgb) / 0.6);
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Workbench styles are owned by pages/workbench.css. */
|
/* Workbench styles are owned by pages/workbench.css. */
|
||||||
|
|
||||||
/* ---------------------------------------------------------- 4. Nav + panels */
|
/* ---------------------------------------------------------- 4. Nav + panels */
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,25 @@
|
||||||
|
|
||||||
--nx-gradient-accent: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
|
--nx-gradient-accent: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
|
||||||
--nx-header-h: 48px; /* pages size themselves with calc(100vh - 48px) */
|
--nx-header-h: 48px; /* pages size themselves with calc(100vh - 48px) */
|
||||||
|
|
||||||
|
/* Liquid glass (Apple-style, not frosted): nearly clear, light blur, and the
|
||||||
|
material read comes from the edges — a specular rim (--nx-glass-specular,
|
||||||
|
painted as a masked 1px ring) and a faint inner glow. Needs a textured
|
||||||
|
backdrop behind it (theme/glass.css) or it simply disappears. */
|
||||||
|
--nx-glass-fill:
|
||||||
|
linear-gradient(180deg, rgb(255 255 255 / 0.065) 0%, rgb(255 255 255 / 0.012) 38%, rgb(255 255 255 / 0.008) 70%, rgb(255 255 255 / 0.03) 100%),
|
||||||
|
rgb(6 14 28 / 0.14);
|
||||||
|
--nx-glass-rim: rgb(255 255 255 / 0.05);
|
||||||
|
--nx-glass-blur: blur(5px) saturate(175%) brightness(1.08);
|
||||||
|
--nx-glass-specular: linear-gradient(135deg,
|
||||||
|
rgb(255 255 255 / 0.60) 0%, rgb(255 255 255 / 0.16) 18%, rgb(255 255 255 / 0.02) 42%,
|
||||||
|
rgb(255 255 255 / 0.02) 62%, rgb(255 255 255 / 0.14) 84%, rgb(255 255 255 / 0.42) 100%);
|
||||||
|
--nx-glass-shadow:
|
||||||
|
inset 0 1px 1px rgb(255 255 255 / 0.12),
|
||||||
|
inset 0 0 28px rgb(255 255 255 / 0.035),
|
||||||
|
inset 0 -14px 28px rgb(120 180 255 / 0.03),
|
||||||
|
0 14px 36px rgb(0 0 0 / 0.40),
|
||||||
|
0 2px 4px rgb(0 0 0 / 0.25);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Legacy --nm-* tokens (hundreds of rules still read them) → single source. */
|
/* Legacy --nm-* tokens (hundreds of rules still read them) → single source. */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue