diff --git a/src/lib/adminWidth.tsx b/src/lib/adminWidth.tsx index 3a3e2fe..5bd3a1e 100644 --- a/src/lib/adminWidth.tsx +++ b/src/lib/adminWidth.tsx @@ -1,8 +1,9 @@ /* ═══════════════════════════════════════════════════════════════ ADMIN PAGE WIDTH - The admin column is max-w-5xl. The record editor wants more: its - section nav sits to the left of a form that keeps that width. + The admin column is max-w-5xl. The record editor wants more (its + section nav sits to the left of a form that keeps that width), and + so does the admin home (three cards across). Like the title (adminTitle.tsx), the page asks and the layout decides, so AdminLayout stays the one place that sets
's width. diff --git a/src/pages/admin/AdminHome.tsx b/src/pages/admin/AdminHome.tsx index 55c81a9..313d1cd 100644 --- a/src/pages/admin/AdminHome.tsx +++ b/src/pages/admin/AdminHome.tsx @@ -10,6 +10,9 @@ One block per header group, in the same order: Data, Pages, Forms, Tools, and Panel, which only exists for superadmins. + It asks for the wide admin column (adminWidth.tsx), like the + editor, so the cards run three across on a wide screen. + The right-hand panel is deliberately inert. Nothing here fetches, so the landing page can't be slow or half-broken on arrival; anything live (open feedback count, last-edited @@ -19,6 +22,7 @@ import { ArrowRight, ArrowUpRight } from "@phosphor-icons/react"; import { Link } from "react-router-dom"; import { useAuth } from "../../lib/auth.tsx"; +import { useWideAdminPage } from "../../lib/adminWidth.tsx"; import { SITE_VERSION } from "../../lib/version.ts"; import { ROLE_LABELS, isSuper } from "../../lib/roles.ts"; import { DATA_NAV, FORMS_NAV, PAGES_NAV, PANEL_NAV, TOOLS_NAV, target, visibleItems } from "./adminNav.ts"; @@ -81,7 +85,7 @@ function CardBlock({ title, blurb, children }) {

{title}

{blurb &&

{blurb}

} -
{children}
+
{children}
); } @@ -111,6 +115,7 @@ const QUICK_ADD = [ export default function AdminHome() { const { user } = useAuth(); const role = ROLE_LABELS[user?.role] ?? user?.role; + useWideAdminPage(); return (