feat: unify admin dashboard shell, add logout button

Admin used an undefined `.portal-shell` class plus the landing-page `.masthead`
markup, so the layout had no background/min-height and CSS "kackte rein".
Generalize PortalShell to take brand/nav props, switch admin/layout.tsx to it
(dark portal masthead + BrandLogo + admin nav), and pass the editorial nav from
redaktion/layout.tsx so both surfaces share one shell.

Add a LogoutButton client component (Better Auth signOut → hard navigate to
/anmelden) rendered into the masthead.

Style the admin content that had no rules: `.content-section dl/dt/dd` mirrors
`.editorial-section dl` (admin detail page), `.editorial-list` mirrors
`.billing-editorial-list` (Redaktionen index, replacing browser bullets),
`.portal-signout` for the dark masthead. Mobile: meta wraps, dl goes single
column.

Update logo.test.tsx to PortalShell's new required props.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Leon TonhäuserandClaude committed 2026-08-11 01:54:59 +02:00
1 parent 23b251be7c
commit 7aeceee078
7 files changed
+187 -31

No files matched your search

+13 -15
View File
@@ -1,27 +1,25 @@
import type { ReactNode } from "react";
import { headers } from "next/headers";
import Link from "next/link";
import { PortalShell } from "@/components/layout/portal-shell";
import { requireAdmin } from "@/modules/auth/principal";
export default async function AdminLayout({ children }: Readonly<{ children: ReactNode }>) {
await requireAdmin(new Headers(await headers()));
return (
<main className="portal-shell">
<header className="masthead">
<Link className="wordmark" href="/admin">
Leon Tonhäuser
</Link>
<span className="section-label">Administration</span>
</header>
<nav aria-label="Administration">
<Link href="/admin/redaktionen">Redaktionen</Link>
<Link href="/admin/abrechnungen">Abrechnungen</Link>
<Link href="/admin/audit">Audit</Link>
</nav>
<PortalShell
brandHref="/admin/redaktionen"
sectionLabel="Administration"
nav={[
{ href: "/admin/redaktionen", label: "Redaktionen" },
{ href: "/admin/abrechnungen", label: "Abrechnungen" },
{ href: "/admin/audit", label: "Audit" },
]}
mainClassName=""
>
{children}
</main>
</PortalShell>
);
}
}
+1 -1
View File
@@ -24,7 +24,7 @@ export default async function EditorialsPage() {
{editorials.length === 0 ? (
<p>Noch keine Redaktionen registriert.</p>
) : (
<ul>
<ul className="editorial-list">
{editorials.map((editorial) => (
<li key={editorial.id}>
<a href={`/admin/redaktionen/${editorial.id}`}>{editorial.name}</a>