feat: redesign portal UI with Sakani UI and add release notes
Replace the hand-rolled Tailwind/shadcn look with Sakani UI across the editorial area, the admin area and all signed-out pages. - AppShell (Sakani Sidebar + TopBar) for /redaktion and /admin, with a mobile drawer, theme toggle, sign-out, legal links and a "Was ist neu" button; PublicShell for login, registration, password, 2FA and errors. - Shared primitives (Button, Card, Input, PageHeader) now render Sakani; components/ui/sakani.tsx is the client boundary for Server Components (Sakani ships no "use client") and adds FormSelect (native form value) and DataTable (element cells from the server). - Legacy CSS variables map onto Sakani tokens; globals.css shrinks from ~2200 to ~700 lines. Geist replaces Inter. recharts/lucide-react dropped (charts via Sakani BarChart). - Release notes popup per area, shown once per version (localStorage) and reopenable from the sidebar; native <dialog> for focus trapping. - Fixes found while testing: TOTP field reused the typed password in clear text, modal dialogs sat top-left, invisible unchecked checkboxes in dark mode. - Parallel run: compose.parallel.yaml, AUTO_RULE_SYNC_DISABLED switch and docs/operations.md §8 (start, rollback, cutover). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
453bece72c
commit
9e938e4d07
79 files changed
+2266
-4316
No files matched your search
@@ -1,5 +1,8 @@
|
||||
import Link from "next/link";
|
||||
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { PageHeader } from "@/components/ui/page-header";
|
||||
import { Card, DataTable, EmptyState, Input } from "@/components/ui/sakani";
|
||||
import { listAuditEvents, type AuditEventRow } from "@/modules/audit/queries";
|
||||
|
||||
import { requireAdminPage } from "../access";
|
||||
@@ -31,71 +34,52 @@ export default async function AuditPage({ searchParams }: { searchParams: Search
|
||||
);
|
||||
|
||||
return (
|
||||
<section className="content-section" aria-labelledby="audit-title">
|
||||
<p className="eyebrow">Administration</p>
|
||||
<h1 id="audit-title">Audit-Protokoll</h1>
|
||||
<p className="form-note">
|
||||
Chronologische Aufzeichnung aller sicherheitsrelevanten Vorgänge. Sortierung fest nach
|
||||
Zeitstempel (neueste zuerst).
|
||||
</p>
|
||||
<section className="flex flex-col gap-6" aria-labelledby="audit-title">
|
||||
<PageHeader
|
||||
kicker="Administration"
|
||||
title="Audit-Protokoll"
|
||||
titleId="audit-title"
|
||||
description="Chronologische Aufzeichnung aller sicherheitsrelevanten Vorgänge. Sortierung fest nach Zeitstempel (neueste zuerst)."
|
||||
/>
|
||||
|
||||
<form method="get" className="audit-filters" aria-label="Audit-Filter">
|
||||
<label>
|
||||
<span className="field-label">Ereignistyp</span>
|
||||
<input
|
||||
name="eventType"
|
||||
defaultValue={eventType ?? ""}
|
||||
placeholder="z. B. editorial_approved"
|
||||
/>
|
||||
</label>
|
||||
<label>
|
||||
<span className="field-label">Datum von (Berlin)</span>
|
||||
<input type="date" name="dateFrom" defaultValue={dateFrom ?? ""} />
|
||||
</label>
|
||||
<label>
|
||||
<span className="field-label">Datum bis (Berlin)</span>
|
||||
<input type="date" name="dateTo" defaultValue={dateTo ?? ""} />
|
||||
</label>
|
||||
<button type="submit">Filtern</button>
|
||||
</form>
|
||||
<Card>
|
||||
<form method="get" className="grid gap-4 sm:grid-cols-[1fr_11rem_11rem_auto] sm:items-end" aria-label="Audit-Filter">
|
||||
<Input label="Ereignistyp" name="eventType" defaultValue={eventType ?? ""} placeholder="z. B. editorial_approved" />
|
||||
<Input label="Datum von (Berlin)" type="date" name="dateFrom" defaultValue={dateFrom ?? ""} />
|
||||
<Input label="Datum bis (Berlin)" type="date" name="dateTo" defaultValue={dateTo ?? ""} />
|
||||
<Button type="submit" variant="secondary">Filtern</Button>
|
||||
</form>
|
||||
</Card>
|
||||
|
||||
{page.events.length === 0 ? (
|
||||
<p>Keine Einträge gefunden.</p>
|
||||
<EmptyState type="no-results" title="Keine Einträge gefunden." description="Passen Sie die Filter an oder setzen Sie sie zurück." />
|
||||
) : (
|
||||
<table className="audit-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Zeitstempel</th>
|
||||
<th>Akteur</th>
|
||||
<th>Ereignistyp</th>
|
||||
<th>Betreff</th>
|
||||
<th>Details</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{page.events.map((event) => (
|
||||
<tr key={event.id}>
|
||||
<td>{berlinFormatter.format(new Date(event.occurredAt))}</td>
|
||||
<td>{actorLabel(event)}</td>
|
||||
<td>{event.eventType}</td>
|
||||
<td>{entityLabel(event)}</td>
|
||||
<td>
|
||||
<pre className="audit-metadata">{formatMetadata(event)}</pre>
|
||||
</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
<DataTable
|
||||
columns={[
|
||||
{ key: "at", header: "Zeitstempel" },
|
||||
{ key: "actor", header: "Akteur" },
|
||||
{ key: "type", header: "Ereignistyp" },
|
||||
{ key: "subject", header: "Betreff" },
|
||||
{ key: "details", header: "Details" },
|
||||
]}
|
||||
rows={page.events.map((event) => ({
|
||||
at: <span className="whitespace-nowrap tabular-nums">{berlinFormatter.format(new Date(event.occurredAt))}</span>,
|
||||
actor: actorLabel(event),
|
||||
type: <code className="break-all text-xs">{event.eventType}</code>,
|
||||
subject: <span className="break-all text-xs">{entityLabel(event)}</span>,
|
||||
details: <pre className="audit-metadata">{formatMetadata(event)}</pre>,
|
||||
}))}
|
||||
/>
|
||||
)}
|
||||
|
||||
{page.nextCursor && (
|
||||
<p className="audit-pagination">
|
||||
<Link
|
||||
href={`/admin/audit?${buildPaginationHref({ eventType, dateFrom, dateTo, cursor: page.nextCursor })}`}
|
||||
>
|
||||
Ältere Einträge laden
|
||||
</Link>
|
||||
</p>
|
||||
<div>
|
||||
<Button asChild variant="outline">
|
||||
<Link href={`/admin/audit?${buildPaginationHref({ eventType, dateFrom, dateTo, cursor: page.nextCursor })}`}>
|
||||
Ältere Einträge laden
|
||||
</Link>
|
||||
</Button>
|
||||
</div>
|
||||
)}
|
||||
</section>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user