Client accept/reject votes with keyboard-driven culling
ci / docker (push) Successful in 13m22s

- verdicts table (per link, like ratings), PUT verdict endpoint, typed Verdict enum
- share page: thumbs up/down, verdict filter with counts, view-scoped selection bar
- lightbox: per-page shortcut table (P/X/U, 1-5/0, S), ? help overlay, action
  toast when a keyboard vote auto-advances
- shared useLightbox hook; single keydown subscription reading live state via ref
- album view: per-link thumbs and vote counts; share list shows accept/reject totals
- feedback queries deduped and run concurrently; verdict counts in one scan
This commit is contained in:
2026-07-17 15:55:46 +02:00
parent 8baed71701
commit 72bcd7a385
14 changed files with 612 additions and 126 deletions
+4 -1
View File
@@ -23,7 +23,10 @@ export default function useSelection(photos) {
return next
})
const selectAll = () => setSelected(new Set(photos.map((p) => p.id)))
// Adds `list` (the caller's currently visible photos) to the selection —
// additive, so selecting all of one filtered view keeps picks from another.
const selectAll = (list) =>
setSelected((prev) => new Set([...prev, ...list.map((p) => p.id)]))
const clear = () => setSelected(new Set())
const selectedBytes = photos.reduce((sum, p) => sum + (selected.has(p.id) ? p.size_bytes : 0), 0)
const totalBytes = photos.reduce((sum, p) => sum + p.size_bytes, 0)