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

+23 -74
View File
@@ -1,15 +1,13 @@
import { AlbumCatalogError, albumCatalog, PHOTO_PAGE_SIZE } from "@/modules/albums/catalog";
import { AlbumContactSheet, formatCount } from "@/modules/albums/catalog-content";
import { AlbumContactSheet, formatCount, PageLinks, PhotoSearchForm } from "@/modules/albums/catalog-content";
import { filterPhotos, paginatePhotos, type InAppPage } from "@/modules/albums/filter";
import { PhotoGallery } from "@/modules/albums/photo-gallery";
import { AnnouncementBanner } from "@/modules/announcements/announcement-banner";
import { announcementService } from "@/modules/announcements/service";
import { loadEditorialDownloadOptions } from "@/modules/downloads/stream";
import { lightboxService } from "@/modules/lightbox/service";
import Link from "next/link";
import { PageHeader } from "@/components/ui/page-header";
import { Input } from "@/components/ui/input";
import { Button } from "@/components/ui/button";
import { Alert, EmptyState } from "@/components/ui/sakani";
import { requireEditorial } from "../access";
@@ -51,15 +49,11 @@ export default async function AlbumsPage({ searchParams }: { searchParams: Promi
const lightboxAssetIds = new Set(lightboxItems.map(i => i.assetId));
return (
<div className="space-y-6 max-w-7xl animate-in fade-in slide-in-from-bottom-4 duration-500" aria-labelledby="albums-title">
<PageHeader
kicker="Bildarchiv · Suche"
title="Suchergebnisse"
titleId="albums-title"
/>
<section className="flex flex-col gap-6" aria-labelledby="albums-title">
<PageHeader kicker="Bildarchiv · Suche" title="Suchergebnisse" titleId="albums-title" />
<AnnouncementBanner items={hints} />
<GlobalSearchForm query={query} format={format} jahr={jahr} />
<p aria-live="polite" className="result-summary" role="status">
<PhotoSearchForm action="/redaktion/alben" query={query} format={format} jahr={jahr} withYear placeholder="Alle Alben durchsuchen …" />
<p aria-live="polite" className="text-sm text-[var(--color-fg-muted)]" role="status">
{formatCount(page.total, "Foto")} gefunden
</p>
<PhotoGallery
@@ -70,7 +64,7 @@ export default async function AlbumsPage({ searchParams }: { searchParams: Promi
showAlbumName
/>
<GlobalSearchPagination currentPage={currentPage} page={page} query={query} format={format} jahr={jahr} />
</div>
</section>
);
}
@@ -81,7 +75,7 @@ export default async function AlbumsPage({ searchParams }: { searchParams: Promi
}
return (
<div className="space-y-8 max-w-7xl animate-in fade-in slide-in-from-bottom-4 duration-500" aria-labelledby="albums-title">
<section className="flex flex-col gap-8" aria-labelledby="albums-title">
<PageHeader
kicker="Bildarchiv · Freigaben"
title="Ihre Alben"
@@ -89,58 +83,23 @@ export default async function AlbumsPage({ searchParams }: { searchParams: Promi
description="Wählen Sie ein Spiel oder eine Serie, um die freigegebenen Fotos zu durchsuchen."
/>
<AnnouncementBanner items={hints} />
<GlobalSearchForm query={query} format={format} jahr={jahr} />
<PhotoSearchForm action="/redaktion/alben" query={query} format={format} jahr={jahr} withYear placeholder="Alle Alben durchsuchen …" />
{result.albums.length === 0 ? (
<p className="text-muted-foreground text-center py-12">Für Ihre Redaktion sind noch keine Fotoalben freigegeben.</p>
<EmptyState title="Noch keine Alben" description="Für Ihre Redaktion sind noch keine Fotoalben freigegeben." />
) : (
<AlbumContactSheet albums={result.albums} />
)}
</div>
</section>
);
}
function SearchRateLimited({ query, format, jahr }: { query: string; format?: string; jahr?: string }) {
return (
<div className="space-y-6 max-w-7xl" aria-labelledby="albums-title">
<section className="flex flex-col gap-6" aria-labelledby="albums-title">
<PageHeader kicker="Bildarchiv · Suche" title="Bitte kurz warten" titleId="albums-title" />
<GlobalSearchForm query={query} format={format} jahr={jahr} />
<p className="bg-muted p-4 rounded-md" role="status">
Es wurden sehr viele Suchanfragen gestellt. Bitte versuchen Sie es in Kürze erneut.
</p>
</div>
);
}
function GlobalSearchForm({ query, format, jahr }: { query: string; format?: string; jahr?: string; }) {
const currentYear = new Date().getFullYear();
const years = Array.from({ length: 10 }, (_, i) => currentYear - i);
return (
<form action="/redaktion/alben" className="flex flex-col sm:flex-row gap-4 items-center bg-card p-4 rounded-xl border border-border shadow-sm w-full" role="search">
<div className="flex-grow w-full sm:w-auto">
<Input
type="search"
name="suche"
defaultValue={query}
placeholder="Alle Alben durchsuchen..."
aria-label="Alle Alben durchsuchen"
/>
</div>
<div className="flex gap-3 w-full sm:w-auto">
<select name="format" defaultValue={format || ""} className="flex h-10 w-full items-center justify-between rounded-md border border-border bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary-500 disabled:cursor-not-allowed disabled:opacity-50">
<option value="">Alle Formate</option>
<option value="quer">Querformat</option>
<option value="hoch">Hochformat</option>
</select>
<select name="jahr" defaultValue={jahr || ""} className="flex h-10 w-full items-center justify-between rounded-md border border-border bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary-500 disabled:cursor-not-allowed disabled:opacity-50">
<option value="">Alle Jahre</option>
{years.map(y => (
<option key={y} value={y.toString()}>{y}</option>
))}
</select>
<Button type="submit" variant="default">Suchen</Button>
</div>
</form>
<PhotoSearchForm action="/redaktion/alben" query={query} format={format} jahr={jahr} withYear placeholder="Alle Alben durchsuchen …" />
<Alert color="warning" description="Es wurden sehr viele Suchanfragen gestellt. Bitte versuchen Sie es in Kürze erneut." />
</section>
);
}
@@ -152,14 +111,10 @@ function GlobalSearchPagination({ currentPage, page, query, format, jahr }: { cu
}
return (
<nav aria-label="Suchergebnisseiten" className="flex justify-between items-center mt-8 pt-4 border-t border-border text-sm font-medium">
{hasPrev ? (
<Link className="text-primary-600 hover:underline" href={globalPageHref(currentPage - 1, query, format, jahr)}>Vorherige Seite</Link>
) : <div />}
{hasNext ? (
<Link className="text-primary-600 hover:underline" href={globalPageHref(currentPage + 1, query, format, jahr)}>Nächste Seite</Link>
) : <div />}
</nav>
<PageLinks
prevHref={hasPrev ? globalPageHref(currentPage - 1, query, format, jahr) : null}
nextHref={hasNext ? globalPageHref(currentPage + 1, query, format, jahr) : null}
/>
);
}
@@ -191,15 +146,9 @@ async function loadAlbums(editorialId: string) {
function ImmichUnavailable() {
return (
<div className="space-y-6 max-w-7xl animate-in fade-in slide-in-from-bottom-4 duration-500" aria-labelledby="albums-title">
<PageHeader
kicker="Bildarchiv"
title="Alben momentan nicht erreichbar"
titleId="albums-title"
/>
<div className="bg-destructive/15 text-destructive p-4 rounded-md border border-destructive/30" role="status">
Bitte laden Sie diese Seite in wenigen Minuten erneut. Ihre Freigaben bleiben unverändert.
</div>
</div>
<section className="flex flex-col gap-6" aria-labelledby="albums-title">
<PageHeader kicker="Bildarchiv" title="Alben momentan nicht erreichbar" titleId="albums-title" />
<Alert color="danger" description="Bitte laden Sie diese Seite in wenigen Minuten erneut. Ihre Freigaben bleiben unverändert." />
</section>
);
}