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

@@ -1,5 +1,5 @@
import Link from "next/link";
import { Plus, Play, Trash2, ArrowLeft } from "lucide-react";
import { IconPlayerPlay, IconPlus, IconTrash } from "@sakaniui/react/icons";
import { notFound } from "next/navigation";
import { autoRuleService } from "@/modules/albums/auto-rules";
@@ -8,7 +8,7 @@ import { editorialAccounts } from "@/db/schema";
import { eq } from "drizzle-orm";
import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
import { EmptyState, Input } from "@/components/ui/sakani";
import { Card, CardContent, CardHeader, CardTitle, CardDescription } from "@/components/ui/card";
import { PageHeader } from "@/components/ui/page-header";
@@ -35,21 +35,12 @@ export default async function AutoRulesPage({ params }: AutoRulesPageProps) {
const rules = await autoRuleService.listRules(id);
return (
<div className="space-y-8 max-w-4xl animate-in fade-in slide-in-from-bottom-4 duration-500">
<PageHeader
kicker="Redaktion · Auto-Zuweisungsregeln"
title={`Auto-Regeln für ${editorial.name}`}
/>
<div className="flex gap-4 mb-6">
<Link
href={`/admin/redaktionen/${editorial.id}/alben`}
className="inline-flex items-center text-sm font-medium text-primary-600 hover:underline"
>
<ArrowLeft className="w-4 h-4 mr-1" />
Zurück zur Album-Verwaltung
</Link>
</div>
<section className="flex max-w-4xl flex-col gap-6">
<PageHeader kicker="Redaktion · Auto-Zuweisungsregeln" title={`Auto-Regeln für ${editorial.name}`}>
<Button asChild variant="outline">
<Link href={`/admin/redaktionen/${editorial.id}/alben`}>Zurück zur Album-Verwaltung</Link>
</Button>
</PageHeader>
<div className="grid gap-6">
<Card>
@@ -60,21 +51,11 @@ export default async function AutoRulesPage({ params }: AutoRulesPageProps) {
</CardDescription>
</CardHeader>
<CardContent>
<form action={createAutoRuleAction.bind(null, editorial.id)} className="flex gap-4 items-end">
<div className="grid gap-2 flex-grow">
<label className="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70">
Schlüsselwort
</label>
<Input
name="keyword"
type="text"
required
placeholder="z.B. FC Bayern"
className="max-w-md"
/>
<form action={createAutoRuleAction.bind(null, editorial.id)} className="flex flex-col gap-4 sm:flex-row sm:items-end">
<div className="w-full max-w-md">
<Input label="Schlüsselwort" name="keyword" placeholder="z.B. FC Bayern" required type="text" />
</div>
<Button type="submit">
<Plus className="w-4 h-4 mr-2" />
<Button type="submit" leftIcon={<IconPlus size={16} />}>
Regel hinzufügen
</Button>
</form>
@@ -83,7 +64,7 @@ export default async function AutoRulesPage({ params }: AutoRulesPageProps) {
<Card>
<CardHeader>
<div className="flex items-start justify-between">
<div className="flex flex-wrap items-start justify-between gap-4">
<div>
<CardTitle>Bestehende Regeln</CardTitle>
<CardDescription>
@@ -91,8 +72,7 @@ export default async function AutoRulesPage({ params }: AutoRulesPageProps) {
</CardDescription>
</div>
<form action={applyAutoRulesAction.bind(null, editorial.id)}>
<Button type="submit" variant="secondary">
<Play className="w-4 h-4 mr-2" />
<Button type="submit" variant="secondary" leftIcon={<IconPlayerPlay size={16} />}>
Regeln jetzt anwenden
</Button>
</form>
@@ -100,20 +80,19 @@ export default async function AutoRulesPage({ params }: AutoRulesPageProps) {
</CardHeader>
<CardContent>
{rules.length === 0 ? (
<p className="text-muted-foreground text-sm">Noch keine Auto-Regeln angelegt.</p>
<EmptyState title="Noch keine Auto-Regeln angelegt." description="Legen Sie oben ein Schlüsselwort an." />
) : (
<ul className="divide-y divide-border border rounded-md">
<ul className="divide-y divide-[var(--color-border-subtle)] rounded-[var(--radius-md)] border border-[var(--color-border-subtle)]">
{rules.map((rule) => (
<li key={rule.id} className="flex items-center justify-between p-4">
<div className="flex flex-col">
<span className="font-medium">{rule.keyword}</span>
<span className="text-xs text-muted-foreground mt-1">
<span className="mt-1 text-xs text-[var(--color-fg-muted)]">
Erstellt am {new Date(rule.createdAt).toLocaleDateString('de-DE')}
</span>
</div>
<form action={deleteAutoRuleAction.bind(null, editorial.id, rule.id)}>
<Button type="submit" variant="ghost" size="sm" className="text-destructive hover:bg-destructive/10 hover:text-destructive">
<Trash2 className="w-4 h-4 mr-2" />
<Button type="submit" variant="ghost" size="sm" leftIcon={<IconTrash size={16} />}>
Entfernen
</Button>
</form>
@@ -124,6 +103,6 @@ export default async function AutoRulesPage({ params }: AutoRulesPageProps) {
</CardContent>
</Card>
</div>
</div>
</section>
);
}