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:
Leon TonhäuserandClaude Opus 5.5 committed 2026-11-30 18:24:05 +01:00
1 parent 453bece72c
commit 9e938e4d07
79 files changed
+2266 -4316

No files matched your search

@@ -2,11 +2,14 @@
import { useState, useRef } from "react";
import { useRouter } from "next/navigation";
import { Alert, Button, Input } from "@sakaniui/react";
import { IconDownload } from "@sakaniui/react/icons";
export function DownloadLightboxForm({ assetIds }: { assetIds: string[] }) {
const [loading, setLoading] = useState(false);
const dialogRef = useRef<HTMLDialogElement>(null);
const [purpose, setPurpose] = useState("");
const [error, setError] = useState<string | null>(null);
const router = useRouter();
async function handleBulkDownload(e: React.FormEvent) {
@@ -14,7 +17,8 @@ export function DownloadLightboxForm({ assetIds }: { assetIds: string[] }) {
if (!purpose.trim() || assetIds.length === 0) return;
setLoading(true);
setError(null);
try {
const response = await fetch("/api/lightbox/bulk-download", {
method: "POST",
@@ -53,7 +57,7 @@ export function DownloadLightboxForm({ assetIds }: { assetIds: string[] }) {
router.refresh(); // Refresh to update usage history
} catch (err) {
const message = err instanceof Error ? err.message : "Download fehlgeschlagen";
alert(`Bulk-Download fehlgeschlagen: ${message}`);
setError(`Bulk-Download fehlgeschlagen: ${message}`);
console.error(err);
} finally {
setLoading(false);
@@ -62,60 +66,41 @@ export function DownloadLightboxForm({ assetIds }: { assetIds: string[] }) {
return (
<>
<button
type="button"
onClick={() => dialogRef.current?.showModal()}
<Button
disabled={assetIds.length === 0}
className="primary-action m-0"
leftIcon={<IconDownload size={16} />}
onClick={() => dialogRef.current?.showModal()}
type="button"
>
Alle herunterladen
</button>
</Button>
<dialog ref={dialogRef} className="rounded-xl p-0 backdrop:bg-black/50 shadow-2xl border border-border bg-card text-card-foreground overflow-hidden max-w-md w-full">
<div className="p-6">
<h2 className="text-xl font-bold mb-4">Verwendungszweck angeben</h2>
<p className="text-sm text-muted-foreground mb-6">
<dialog ref={dialogRef} aria-labelledby="bulk-download-title" className="usage-dialog max-w-md">
<form className="flex flex-col gap-4 p-6" onSubmit={handleBulkDownload}>
<h2 id="bulk-download-title" className="text-xl font-semibold">Verwendungszweck angeben</h2>
<p className="text-sm text-[var(--color-fg-muted)]">
Bitte gib einen gemeinsamen Verwendungszweck für alle {assetIds.length} Bilder an. Diese werden in einem ZIP-Archiv heruntergeladen.
</p>
<form onSubmit={handleBulkDownload}>
<div className="space-y-4">
<div>
<label htmlFor="purpose" className="block text-sm font-medium mb-1">
Verwendungszweck
</label>
<input
id="purpose"
type="text"
required
placeholder="z.B. Webseite, Social Media"
value={purpose}
onChange={(e) => setPurpose(e.target.value)}
className="flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"
disabled={loading}
/>
</div>
</div>
<div className="mt-8 flex justify-end gap-3">
<button
type="button"
onClick={() => dialogRef.current?.close()}
className="inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border border-input bg-background hover:bg-accent hover:text-accent-foreground h-10 px-4 py-2"
disabled={loading}
>
Abbrechen
</button>
<button
type="submit"
className="inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 bg-primary text-primary-foreground hover:bg-primary/90 h-10 px-4 py-2"
disabled={loading || !purpose.trim()}
>
{loading ? "Wird verpackt..." : "Download starten (ZIP)"}
</button>
</div>
</form>
</div>
<Input
disabled={loading}
id="purpose"
label="Verwendungszweck"
onChange={(e) => setPurpose(e.target.value)}
placeholder="z.B. Webseite, Social Media"
required
type="text"
value={purpose}
/>
{error ? <Alert color="danger" description={error} /> : null}
<div className="mt-4 flex justify-end gap-3">
<Button disabled={loading} onClick={() => dialogRef.current?.close()} type="button" variant="ghost">
Abbrechen
</Button>
<Button disabled={loading || !purpose.trim()} type="submit">
{loading ? "Wird verpackt …" : "Download starten (ZIP)"}
</Button>
</div>
</form>
</dialog>
</>
);