From f12f4edc69c87a087d766b1daeccf190df82facc Mon Sep 17 00:00:00 2001 From: neodk2004 Date: Tue, 25 Aug 2026 18:52:08 +0200 Subject: [PATCH] feat(admin): fix admin shell theme tokens, declutter dashboard, add active-page nav highlight MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Admin shell used hardcoded zinc-* classes instead of semantic design tokens and a redundant "PawFeed Admin" kicker label. Dashboard was a wall of 12 identically weighted stat cards with no hierarchy. Sidebar/mobile nav gave no indication of the current page. - layout.tsx/AdminMobileNav.tsx/GranularityToggle.tsx/TimeSeriesChart.tsx: replace zinc-* with bg-background/text-foreground/border-border etc., force dark via the `dark` class so the admin surface stays permanently dark regardless of site-wide theme toggle - New AdminSidebarNav.tsx: highlights the current page (desktop sidebar) - AdminMobileNav.tsx: same active-state logic for the mobile drawer, topbar shows the current page label instead of a static title - page.tsx: replace the 12-card stat grid with 2 AttentionStat tiles (reports, pending verifications — color means "act on this") plus a flat Overview list, and convert the 5 chart containers to the shared Card component --- src/app/p/[secret]/layout.tsx | 29 +-- src/app/p/[secret]/page.tsx | 265 ++++++++++++--------- src/components/admin/AdminMobileNav.tsx | 33 ++- src/components/admin/AdminSidebarNav.tsx | 42 ++++ src/components/admin/GranularityToggle.tsx | 6 +- src/components/admin/TimeSeriesChart.tsx | 2 +- 6 files changed, 224 insertions(+), 153 deletions(-) create mode 100644 src/components/admin/AdminSidebarNav.tsx diff --git a/src/app/p/[secret]/layout.tsx b/src/app/p/[secret]/layout.tsx index e91e3cb..586009f 100644 --- a/src/app/p/[secret]/layout.tsx +++ b/src/app/p/[secret]/layout.tsx @@ -4,6 +4,7 @@ import Link from "next/link"; import { createTRPCCaller } from "@/trpc/server"; import { timingSafeStringEqual } from "@/lib/timing-safe-compare"; import { AdminMobileNav } from "@/components/admin/AdminMobileNav"; +import { AdminSidebarNav } from "@/components/admin/AdminSidebarNav"; import { LayoutDashboard, Users, @@ -79,30 +80,22 @@ export default async function AdminLayout({ children, params }: AdminLayoutProps })); return ( -
+ // Admin stays permanently dark regardless of the visitor site's theme + // toggle — a moderator's ops tool, not a marketing surface — but now + // pinned to PawFeed's own dark palette (the `dark` class resolves the + // real design tokens) instead of a generic, disconnected zinc scaffold. +
{/* Mobile topbar + drawer — hidden md: and up */} - + {/* Sidebar — hidden below md:, permanent from md: up */} -