feat: Seiten für Übersicht, Kalender und Statistik

Der Kalender ist als Tabelle ausgezeichnet — ein Kalender ist eine Tabelle,
und mit Screenreader wird daraus dann „Woche 3, Donnerstag, 24." statt einer
ununterscheidbaren Kachelwüste.
This commit is contained in:
Florian Wilde
2026-09-01 19:54:16 +02:00
parent 0e51df7bad
commit 8c872b240a
5 changed files with 771 additions and 55 deletions
+38
View File
@@ -0,0 +1,38 @@
"use client";
import { useTransition } from "react";
import { useRouter } from "next/navigation";
import { undoAction, watchNextAction } from "@/app/actions/library";
import { useToasts } from "@/components/Toasts";
/**
* „+1 Episode" für die Übersicht — derselbe Griff wie auf der Detailseite,
* nur ohne Kontext drumherum.
*/
export function QuickWatch({ entryId }: { entryId: string }) {
const router = useRouter();
const { report } = useToasts();
const [pending, startTransition] = useTransition();
async function undo(watchIds: string[]) {
await undoAction(entryId, watchIds);
router.refresh();
}
return (
<button
type="button"
disabled={pending}
onClick={() =>
startTransition(async () => {
const result = await watchNextAction(entryId);
report(result, (ids) => undo(ids));
router.refresh();
})
}
className="fl-btn fl-btn-ghost px-3 py-1.5 text-sm"
>
+1 Episode
</button>
);
}