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

@@ -3,6 +3,10 @@
/* eslint-disable @next/next/no-img-element */
import { useState, useTransition } from "react";
import { Badge, Button, EmptyState, Input } from "@sakaniui/react";
import { IconMail, IconSearch } from "@sakaniui/react/icons";
import { Card } from "@/components/ui/sakani";
import type { AlbumActionResult } from "./actions";
@@ -49,75 +53,69 @@ function AlbumCard({ album, editorialId, grantAction, revokeAction, notifyAction
});
};
const notifyLabel =
notifyStatus === "pending" ? "Wird gesendet …" :
notifyStatus === "success" ? "E-Mail gesendet!" :
notifyStatus === "error" ? "Fehler beim Senden" :
"Redaktion benachrichtigen";
return (
<li className={`flex flex-col bg-white border ${album.isGranted ? 'border-green-500 shadow-md ring-1 ring-green-500' : 'border-gray-200'} rounded-xl overflow-hidden transition-all duration-300 hover:shadow-lg`} data-granted={album.isGranted}>
<div className="relative aspect-[3/2] bg-gray-100 overflow-hidden">
{album.albumThumbnailAssetId ? (
<img
className="w-full h-full object-contain transition-transform duration-500 hover:scale-105"
alt={`Titelbild von ${album.albumName}`}
loading="lazy"
src={`/api/assets/${encodeURIComponent(album.albumThumbnailAssetId)}/thumbnail?albumId=${encodeURIComponent(album.id)}`}
/>
) : (
<div aria-label="Kein Albumcover verfügbar" className="w-full h-full flex items-center justify-center text-gray-400 text-xs uppercase tracking-widest" role="img">
Kein Cover
</div>
)}
{album.isGranted && (
<div className="absolute top-2 right-2 bg-green-500 text-white text-xs font-bold px-2 py-1 rounded-full shadow-sm">
Zugewiesen
</div>
)}
</div>
<div className="p-4 flex flex-col flex-grow">
<h2 className="text-base font-bold text-gray-900 mb-1 truncate" id={`album-${album.id}`} title={album.albumName}>
{album.albumName}
</h2>
<p className="text-sm text-gray-500 mb-4">{album.assetCount} Fotos</p>
<div className="mt-auto space-y-2">
<form action={handleAction}>
<input name="immichAlbumId" type="hidden" value={album.id} />
<button
type="submit"
className={`w-full py-2 px-4 rounded-lg font-semibold text-sm transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-1 ${
album.isGranted
? "bg-red-50 text-red-600 hover:bg-red-100 focus:ring-red-500 border border-red-200"
: "bg-gray-900 text-white hover:bg-gray-800 focus:ring-gray-900"
}`}
disabled={isPending}
>
{isPending ? "Wird verarbeitet..." : album.isGranted ? "Zuweisung aufheben" : "Album zuweisen"}
</button>
</form>
<li data-granted={album.isGranted}>
<Card className={`h-full ${album.isGranted ? "outline-2 outline-[var(--color-success-solid)]" : ""}`}>
<div className="relative aspect-[3/2] overflow-hidden rounded-[var(--radius-lg)] bg-[var(--color-bg-subtle)]">
{album.albumThumbnailAssetId ? (
<img
className="h-full w-full object-contain"
alt={`Titelbild von ${album.albumName}`}
loading="lazy"
src={`/api/assets/${encodeURIComponent(album.albumThumbnailAssetId)}/thumbnail?albumId=${encodeURIComponent(album.id)}`}
/>
) : (
<div aria-label="Kein Albumcover verfügbar" className="grid h-full w-full place-items-center text-xs text-[var(--color-fg-muted)]" role="img">
Kein Cover
</div>
)}
{album.isGranted && (
<form action={(formData) => {
setNotifyStatus("pending");
notifyAction(editorialId, { ok: true, message: "" }, formData).then((res) => {
setNotifyStatus(res.ok ? "success" : "error");
setTimeout(() => setNotifyStatus("idle"), 3000);
});
}}>
<Badge className="absolute top-2 right-2" emphasis="solid" variant="success">Zugewiesen</Badge>
)}
</div>
<div className="flex flex-col gap-1">
<h2 className="truncate text-base font-semibold" id={`album-${album.id}`} title={album.albumName}>
{album.albumName}
</h2>
<p className="text-sm text-[var(--color-fg-muted)]">{album.assetCount} Fotos</p>
</div>
<div className="mt-auto flex flex-col gap-2">
<form action={handleAction} className="flex flex-col">
<input name="immichAlbumId" type="hidden" value={album.id} />
<Button disabled={isPending} type="submit" variant={album.isGranted ? "outline" : "primary"}>
{isPending ? "Wird verarbeitet …" : album.isGranted ? "Zuweisung aufheben" : "Album zuweisen"}
</Button>
</form>
{album.isGranted && (
<form
className="flex flex-col"
action={(formData) => {
setNotifyStatus("pending");
notifyAction(editorialId, { ok: true, message: "" }, formData).then((res) => {
setNotifyStatus(res.ok ? "success" : "error");
setTimeout(() => setNotifyStatus("idle"), 3000);
});
}}
>
<input name="albumName" type="hidden" value={album.albumName} />
<button
type="submit"
className={`w-full py-2 px-4 rounded-lg font-semibold text-sm transition-colors duration-200 border ${
notifyStatus === "success" ? "bg-green-50 text-green-700 border-green-200" :
notifyStatus === "error" ? "bg-red-50 text-red-700 border-red-200" :
"bg-white text-gray-700 hover:bg-gray-50 border-gray-200 focus:ring-2 focus:ring-gray-200 focus:outline-none"
}`}
<Button
disabled={notifyStatus === "pending" || notifyStatus === "success"}
leftIcon={<IconMail size={16} />}
type="submit"
variant={notifyStatus === "error" ? "destructive" : "ghost"}
>
{notifyStatus === "pending" ? "Wird gesendet..." :
notifyStatus === "success" ? "E-Mail gesendet!" :
notifyStatus === "error" ? "Fehler beim Senden" :
"Redaktion benachrichtigen"}
</button>
{notifyLabel}
</Button>
</form>
)}
</div>
</div>
</Card>
</li>
);
}
@@ -130,20 +128,22 @@ export function AlbumGrid({ albums, editorialId, grantAction, revokeAction, noti
);
return (
<div>
<input
type="search"
className="album-grid-search"
placeholder="Alben suchen..."
value={search}
onChange={(e) => setSearch(e.target.value)}
aria-label="Alben durchsuchen"
/>
<div className="flex flex-col gap-6">
<div className="max-w-md">
<Input
aria-label="Alben durchsuchen"
leadingIcon={<IconSearch size={16} />}
onChange={(e) => setSearch(e.target.value)}
placeholder="Alben suchen …"
type="search"
value={search}
/>
</div>
{filteredAlbums.length === 0 ? (
<p>Keine Alben gefunden.</p>
<EmptyState type="no-results" title="Keine Alben gefunden." description="Versuchen Sie einen anderen Suchbegriff." />
) : (
<ul className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-6" aria-label="Zuweisbare Immich-Alben">
<ul className="grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 2xl:grid-cols-4" aria-label="Zuweisbare Immich-Alben">
{filteredAlbums.map((album) => (
<AlbumCard
key={album.id}