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:
1 parent
453bece72c
commit
9e938e4d07
79 files changed
+2266
-4316
No files matched your search
@@ -2,8 +2,11 @@
|
||||
|
||||
import { useId, useState, useTransition } from "react";
|
||||
|
||||
import { Alert, Input, Textarea } from "@sakaniui/react";
|
||||
|
||||
import { Card } from "@/components/ui/sakani";
|
||||
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Input } from "@/components/ui/input";
|
||||
|
||||
import type { AnnouncementActionResult } from "./actions";
|
||||
|
||||
@@ -36,56 +39,42 @@ export function AnnouncementForm({
|
||||
};
|
||||
|
||||
return (
|
||||
<form
|
||||
action={handleSubmit}
|
||||
className="bg-card p-4 rounded-xl border border-border shadow-sm space-y-4"
|
||||
>
|
||||
<div className="space-y-2">
|
||||
<label htmlFor={messageId} className="text-sm font-medium">
|
||||
Nachricht
|
||||
</label>
|
||||
<textarea
|
||||
<Card title="Neuer Hinweis">
|
||||
<form action={handleSubmit} className="flex flex-col gap-4">
|
||||
<Textarea
|
||||
description={`${message.length}/500 Zeichen`}
|
||||
id={messageId}
|
||||
name="message"
|
||||
rows={3}
|
||||
label="Nachricht"
|
||||
maxLength={500}
|
||||
required
|
||||
value={message}
|
||||
name="message"
|
||||
onChange={(event) => setMessage(event.target.value)}
|
||||
placeholder="z. B. Liebl ist heute beim HSV-Spiel — Freigaben und Downloads sind trotzdem verfügbar, Antworten dauern etwas länger."
|
||||
className="flex w-full rounded-md border border-border bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"
|
||||
/>
|
||||
<p className="text-xs text-muted-foreground">{message.length}/500 Zeichen</p>
|
||||
</div>
|
||||
<div className="space-y-2">
|
||||
<label htmlFor={dateId} className="text-sm font-medium">
|
||||
Datum des Ereignisses (z. B. Spieltag)
|
||||
</label>
|
||||
<Input
|
||||
id={dateId}
|
||||
type="date"
|
||||
name="eventDate"
|
||||
defaultValue={defaultEventDate}
|
||||
required
|
||||
className="sm:w-48"
|
||||
rows={3}
|
||||
value={message}
|
||||
/>
|
||||
<p className="text-xs text-muted-foreground">
|
||||
Der Hinweis wird sofort sichtbar und verschwindet automatisch drei Tage nach diesem
|
||||
Datum.
|
||||
</p>
|
||||
</div>
|
||||
<Button type="submit" disabled={pending}>
|
||||
{pending ? "Wird veröffentlicht…" : "Hinweis veröffentlichen"}
|
||||
</Button>
|
||||
{state.message ? (
|
||||
<p
|
||||
role="status"
|
||||
aria-live="polite"
|
||||
className={state.ok ? "text-sm text-green-600 dark:text-green-400" : "text-sm text-destructive"}
|
||||
>
|
||||
{state.message}
|
||||
</p>
|
||||
) : null}
|
||||
</form>
|
||||
<div className="sm:max-w-xs">
|
||||
<Input
|
||||
defaultValue={defaultEventDate}
|
||||
description="Der Hinweis wird sofort sichtbar und verschwindet automatisch drei Tage nach diesem Datum."
|
||||
id={dateId}
|
||||
label="Datum des Ereignisses (z. B. Spieltag)"
|
||||
name="eventDate"
|
||||
required
|
||||
type="date"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<Button type="submit" disabled={pending}>
|
||||
{pending ? "Wird veröffentlicht …" : "Hinweis veröffentlichen"}
|
||||
</Button>
|
||||
</div>
|
||||
{state.message ? (
|
||||
<div aria-live="polite">
|
||||
<Alert color={state.ok ? "success" : "danger"} description={state.message} />
|
||||
</div>
|
||||
) : null}
|
||||
</form>
|
||||
</Card>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user