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,8 +1,10 @@
import { Spinner } from "@/components/ui/sakani";
export default function AlbumLoading() {
return (
<section className="editorial-section editorial-state" aria-busy="true" aria-live="polite">
<p className="editorial-kicker">Bildarchiv</p>
<div className="flex items-center gap-3 py-16 text-[var(--color-fg-muted)]" aria-busy="true" aria-live="polite">
<Spinner size="sm" label="Fotos werden geladen." />
<p>Fotos werden geladen.</p>
</section>
</div>
);
}
+21 -53
View File
@@ -2,14 +2,16 @@ import Link from "next/link";
import { notFound } from "next/navigation";
import { AlbumCatalogError, albumCatalog, PHOTO_PAGE_SIZE } from "@/modules/albums/catalog";
import { formatCount, PhotoPagination } from "@/modules/albums/catalog-content";
import { formatCount, PhotoPagination, PhotoSearchForm } from "@/modules/albums/catalog-content";
import { filterPhotos, paginatePhotos } from "@/modules/albums/filter";
import { PhotoGallery } from "@/modules/albums/photo-gallery";
import { loadEditorialDownloadOptions } from "@/modules/downloads/stream";
import { lightboxService } from "@/modules/lightbox/service";
import { requireEditorial } from "../../access";
import { Button } from "@/components/ui/button";
import { PageHeader } from "@/components/ui/page-header";
import { Alert } from "@/components/ui/sakani";
// ponytail: fetch the whole album in one request so hoch/quer and jahr filters
// can be applied across the full set before paginating, instead of over a
@@ -48,18 +50,24 @@ export default async function AlbumPage({ params, searchParams }: AlbumPageProps
}
return (
<section className="editorial-section" aria-labelledby="album-title">
<section aria-labelledby="album-title">
<PageHeader
kicker={`Bildarchiv · ${result.album.assetCount} freigegebene Fotos`}
title={result.album.albumName}
titleId="album-title"
>
<Link className="quiet-link" href="/redaktion/alben">
Alle Alben
</Link>
<Button asChild variant="outline">
<Link href="/redaktion/alben">Alle Alben</Link>
</Button>
</PageHeader>
<AlbumSearchForm albumId={result.album.id} query={query} format={format} />
<p aria-live="polite" className="result-summary" role="status">
<PhotoSearchForm
action={`/redaktion/alben/${result.album.id}`}
ariaLabel="Fotos in diesem Album durchsuchen"
query={query}
format={format}
placeholder="Dieses Album durchsuchen …"
/>
<p aria-live="polite" className="my-4 text-sm text-[var(--color-fg-muted)]" role="status">
{formatCount(result.page.total, "Foto")} gefunden
</p>
<PhotoGallery
@@ -81,40 +89,6 @@ export default async function AlbumPage({ params, searchParams }: AlbumPageProps
);
}
function AlbumSearchForm({ albumId, query, format }: { albumId: string; query: string; format?: string; }) {
return (
<form
action={`/redaktion/alben/${albumId}`}
className="album-search-form"
role="search"
aria-label={`Fotos in diesem Album durchsuchen`}
>
<div className="album-search-input">
<label className="album-search-label" htmlFor="album-search-suche">Suchbegriff</label>
<input
id="album-search-suche"
type="search"
name="suche"
defaultValue={query}
placeholder="Dieses Album durchsuchen..."
aria-label="Suchbegriff"
/>
</div>
<div className="album-search-filters">
<label className="album-search-select">
<span>Format</span>
<select name="format" defaultValue={format || ""}>
<option value="">Alle Formate</option>
<option value="quer">Querformat</option>
<option value="hoch">Hochformat</option>
</select>
</label>
<button type="submit">Suchen</button>
</div>
</form>
);
}
async function loadAlbumPage({
editorialId,
albumId,
@@ -178,19 +152,13 @@ function normalizedQuery(value: string | undefined): string {
function ImmichUnavailable() {
return (
<section className="editorial-section editorial-state" aria-labelledby="album-title">
<PageHeader
kicker="Bildarchiv"
title="Fotos momentan nicht erreichbar"
titleId="album-title"
>
<div className="flex flex-col gap-2 items-end">
<p role="status">Bitte laden Sie diese Seite in wenigen Minuten erneut.</p>
<Link className="quiet-link" href="/redaktion/alben">
Zurück zu den Alben
</Link>
</div>
<section className="flex flex-col gap-6" aria-labelledby="album-title">
<PageHeader kicker="Bildarchiv" title="Fotos momentan nicht erreichbar" titleId="album-title">
<Button asChild variant="outline">
<Link href="/redaktion/alben">Zurück zu den Alben</Link>
</Button>
</PageHeader>
<Alert color="warning" description="Bitte laden Sie diese Seite in wenigen Minuten erneut." />
</section>
);
}
+5 -3
View File
@@ -1,8 +1,10 @@
import { Spinner } from "@/components/ui/sakani";
export default function AlbumsLoading() {
return (
<section className="editorial-section editorial-state" aria-busy="true" aria-live="polite">
<p className="editorial-kicker">Bildarchiv</p>
<div className="flex items-center gap-3 py-16 text-[var(--color-fg-muted)]" aria-busy="true" aria-live="polite">
<Spinner size="sm" label="Alben werden geladen." />
<p>Alben werden geladen.</p>
</section>
</div>
);
}
+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>
);
}