Release 2.4.0: bulk download rework, toasts and Sakani polish
- ZIP download from the Merkzettel: every photo is a new usage by default; only already downloaded photos offer "Neu / Bereits genutzt" (SegmentedControl), with thumbnails and a cost summary. "Bild auslassen" is gone. - Toasts (Sakani Toaster) for admin saves, deletes and errors; billing errors are readable and use router.refresh instead of reloads. Errors inside modal dialogs stay inline (a toast would sit behind the backdrop). - Album overview in blog-listing style, Sakani Pagination for albums, search and usage history, skeleton loading states. - Registration stepper; verification mail lands on step 3. - Editorials as a searchable, filterable table; audit log with event picker, German labels and collapsible details. - Release notes 2.4.0 seeded (migration 0009). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2775b406bf
commit
cba70310f9
48 files changed
+3474
-454
No files matched your search
@@ -1,9 +1,9 @@
|
||||
"use client";
|
||||
|
||||
import { useState, useTransition } from "react";
|
||||
import { useTransition } from "react";
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { Badge, Button } from "@sakaniui/react";
|
||||
import { Badge, Button, toast } from "@sakaniui/react";
|
||||
|
||||
import type { EventAccessState } from "@/modules/calendar/service";
|
||||
|
||||
@@ -25,7 +25,6 @@ export function EventAccessAction({
|
||||
unreserveAction: Action;
|
||||
}>) {
|
||||
const router = useRouter();
|
||||
const [state, setState] = useState<CalendarActionResult>({ ok: true, message: "" });
|
||||
const [pending, startTransition] = useTransition();
|
||||
|
||||
const run = (action: Action) => {
|
||||
@@ -33,8 +32,12 @@ export function EventAccessAction({
|
||||
formData.set("eventId", eventId);
|
||||
startTransition(async () => {
|
||||
const result = await action({ ok: true, message: "" }, formData);
|
||||
setState(result);
|
||||
if (result.ok) router.refresh();
|
||||
if (result.ok) {
|
||||
toast.success(result.message);
|
||||
router.refresh();
|
||||
} else {
|
||||
toast.error(result.message);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -71,17 +74,6 @@ export function EventAccessAction({
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="flex flex-col items-start gap-1 sm:items-end">
|
||||
<div className="flex flex-wrap items-center gap-2">{content}</div>
|
||||
{state.message ? (
|
||||
<p
|
||||
aria-live="polite"
|
||||
className={`text-xs ${state.ok ? "text-[var(--color-fg-muted)]" : "text-[var(--color-danger-fg)]"}`}
|
||||
role={state.ok ? "status" : "alert"}
|
||||
>
|
||||
{state.message}
|
||||
</p>
|
||||
) : null}
|
||||
</div>
|
||||
<div className="flex flex-wrap items-center gap-2">{content}</div>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user