Reorganize admin nav by feature and soften light mode.

Sidebar lists one entry per feature; keep hub tabs only for sibling views (events, tickets, ranks/permissions, moderation, radio, analytics, devops). Soft cool-gray light canvas/surface replaces harsh white.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
SimoandCursor committed 2026-07-18 22:06:41 +02:00
1 parent 022fbfa223
commit dd806d2527
9 files changed
+344 -267

No files matched your search

+22 -5
View File
@@ -27,6 +27,19 @@ export interface AdminPalette {
focusRing: string;
}
/** Pure / near-white public surfaces → soft admin paper (less eye strain). */
function softLightSurface(
value: string | undefined,
softDefault: string,
): string {
if (!value) return softDefault;
const v = value.trim().toLowerCase();
if (v === "#fff" || v === "#ffffff" || v === "white") return softDefault;
// Common slate/zinc paper whites (#f8fafc, #fafafa, #f9fafb, …)
if (/^#f[89a-f][0-9a-f]{4}$/i.test(v)) return softDefault;
return value;
}
export function deriveAdminPalette(
colors: PublicThemeColors,
overrides?: Partial<AdminPalette>,
@@ -34,13 +47,14 @@ export function deriveAdminPalette(
): AdminPalette {
const accent = overrides?.accent ?? colors.color_primary ?? "#f59e0b";
// Soft cool gray-blue paper (not pure white) — easier on the eyes in light HK.
const lightDefaults: AdminPalette = {
canvas: colors.color_background ?? "#f8fafc",
surface: colors.color_surface ?? "#ffffff",
surfaceElevated: colors.color_dropdown ?? "#f1f5f9",
canvas: softLightSurface(colors.color_background, "#eef1f4"),
surface: softLightSurface(colors.color_surface, "#f5f7fa"),
surfaceElevated: softLightSurface(colors.color_dropdown, "#fafbfc"),
text: colors.color_text ?? "#0f172a",
muted: colors.color_text_muted ?? "#64748b",
border: "#e2e8f0",
border: "#d8dee6",
accent,
accentText: accent,
accentForeground: "#ffffff",
@@ -48,7 +62,10 @@ export function deriveAdminPalette(
warning: colors.color_warning ?? "#eab308",
error: colors.color_error ?? "#ef4444",
info: colors.color_info ?? "#0ea5e9",
sidebar: colors.color_navbar ?? colors.color_surface ?? "#ffffff",
sidebar: softLightSurface(
colors.color_navbar ?? colors.color_surface,
"#e8ecf1",
),
sidebarText: colors.color_navbar_text ?? colors.color_text ?? "#0f172a",
overlay: "rgba(15, 23, 42, 0.45)",
focusRing: accent,