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

+35 -41
View File
@@ -2,6 +2,8 @@
import { type FormEvent, useState } from "react";
import { Alert, Input } from "@sakaniui/react";
import { Button } from "@/components/ui/button";
import { authClient } from "@/modules/auth/client";
@@ -82,19 +84,18 @@ export function TwoFactorWizard({ initiallyEnabled }: { initiallyEnabled: boolea
}
return (
<div className="space-y-6">
<div className="flex flex-col gap-6">
{!enabled && step === "password" && (
<form onSubmit={startSetup} className="space-y-4">
<label className="block text-sm font-medium">
Passwort bestätigen, um die Einrichtung zu starten
<input
<form onSubmit={startSetup} className="flex flex-col items-start gap-4">
<div className="w-full">
<Input
autoComplete="current-password"
className="mt-1 block w-full"
label="Passwort bestätigen, um die Einrichtung zu starten"
name="password"
required
type="password"
/>
</label>
</div>
<Button disabled={pending} type="submit">
{pending ? "Wird vorbereitet …" : "Einrichtung starten"}
</Button>
@@ -102,12 +103,12 @@ export function TwoFactorWizard({ initiallyEnabled }: { initiallyEnabled: boolea
)}
{step === "scan" && secret && (
<div className="space-y-4">
<ol className="text-sm space-y-2 list-decimal list-inside text-muted-foreground">
<div className="flex flex-col gap-4">
<ol className="flex list-inside list-decimal flex-col gap-2 text-sm text-[var(--color-fg-muted)]">
<li>Öffnen Sie Ihre Authenticator-App (z. B. Google Authenticator, Aegis, 1Password).</li>
<li>
Fügen Sie einen neuen Eintrag hinzu und geben Sie diesen Schlüssel manuell ein:
<code className="block mt-2 rounded-md bg-muted p-3 font-mono text-base tracking-widest select-all break-all">
<code className="mt-2 block select-all break-all rounded-[var(--radius-md)] bg-[var(--color-bg-subtle)] p-3 font-mono text-base tracking-widest text-[var(--color-fg-default)]">
{secret}
</code>
<span className="text-xs mt-1 block">
@@ -118,74 +119,67 @@ export function TwoFactorWizard({ initiallyEnabled }: { initiallyEnabled: boolea
</ol>
{backupCodes.length > 0 && (
<div className="rounded-md border border-amber-500/40 bg-amber-500/10 p-4 text-sm">
<p className="font-medium mb-2">Einmal-Codes (ersatzweise gültig, je einmal nutzbar)</p>
<div className="grid grid-cols-2 sm:grid-cols-3 gap-1 font-mono text-xs">
<div className="flex flex-col gap-2 rounded-[var(--radius-lg)] border border-[var(--color-warning-border)] bg-[var(--color-warning-bg)] p-4 text-sm">
<p className="font-medium">Einmal-Codes (ersatzweise gültig, je einmal nutzbar)</p>
<div className="grid grid-cols-2 gap-1 font-mono text-xs sm:grid-cols-3">
{backupCodes.map((code) => (
<span key={code}>{code}</span>
))}
</div>
<p className="text-xs mt-2 text-muted-foreground">
<p className="text-xs text-[var(--color-fg-muted)]">
Bewahren Sie diese Codes sicher auf – sie werden nur jetzt angezeigt.
</p>
</div>
)}
<form onSubmit={confirmCode} className="space-y-4">
<label className="block text-sm font-medium">
Code aus der App
<input
<form onSubmit={confirmCode} className="flex flex-col items-start gap-4">
<div className="w-48">
<Input
autoComplete="one-time-code"
className="mt-1 block w-full max-w-[12rem]"
inputMode="numeric"
label="Code aus der App"
maxLength={6}
name="code"
pattern="[0-9]*"
required
type="text"
/>
</label>
</div>
<Button disabled={pending} type="submit">
{pending ? "Code wird geprüft …" : "Aktivieren"}
</Button>
</Button>
</form>
</div>
)}
{step === "done" && (
<div className="rounded-md border border-emerald-600/40 bg-emerald-600/10 p-4 text-sm" role="status">
Zwei-Faktor-Authentifizierung ist aktiviert. Sie können sich ab jetzt nur noch mit
Passwort und Authenticator-Code anmelden.
<a className="primary-action inline-block mt-4" href="/admin">
Weiter zum Admin-Bereich
</a>
<div className="flex flex-col items-start gap-4" role="status">
<Alert
color="success"
description="Zwei-Faktor-Authentifizierung ist aktiviert. Sie können sich ab jetzt nur noch mit Passwort und Authenticator-Code anmelden."
/>
<Button asChild>
<a href="/admin">Weiter zum Admin-Bereich</a>
</Button>
</div>
)}
{enabled && step !== "done" && (
<form onSubmit={disable} className="space-y-4 border-t pt-6">
<p className="text-sm text-muted-foreground">
<form onSubmit={disable} className="flex flex-col items-start gap-4 border-t border-[var(--color-border-subtle)] pt-6">
<p className="text-sm text-[var(--color-fg-muted)]">
Zwei-Faktor ist aktiviert. Zum Deaktivieren Ihr Passwort eingeben – danach muss die
Einrichtung neu erfolgen, bevor Admin-Bereiche wieder zugänglich sind.
</p>
<input
autoComplete="current-password"
name="password"
placeholder="Passwort"
required
type="password"
/>
<div className="w-full">
<Input aria-label="Passwort" autoComplete="current-password" name="password" placeholder="Passwort" required type="password" />
</div>
<Button variant="outline" disabled={pending} type="submit">
{pending ? "Wird deaktiviert …" : "Zwei-Faktor deaktivieren"}
</Button>
</form>
)}
{error && (
<p className="field-error" role="alert">
{error}
</p>
)}
{error && <Alert color="danger" description={error} />}
</div>
);
}