You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.6 KiB
Markdown
48 lines
1.6 KiB
Markdown
---
|
|
# quotesdb-twgb
|
|
title: 'quotesdb/ui: admin moderation tab (paginated reports, per-quote modal with delete/hide)'
|
|
status: completed
|
|
type: feature
|
|
priority: normal
|
|
created_at: 2026-03-10T23:32:06Z
|
|
updated_at: 2026-03-10T23:32:14Z
|
|
blocked_by:
|
|
- quotesdb-ooyx
|
|
- quotesdb-r3eq
|
|
---
|
|
|
|
## Summary
|
|
Add a Moderation tab to the admin page showing a paginated list of reported quotes. Clicking a report opens a detail modal with the quote and all reports, plus action buttons.
|
|
|
|
## Tab: Moderation
|
|
- Only visible on the admin page after auth is unlocked
|
|
- Paginated list (10/page) of quotes with at least one report
|
|
- Each row shows: quote text (truncated), author, report count, most recent report date
|
|
- Clicking a row opens a Report Detail Modal
|
|
|
|
## Report Detail Modal
|
|
- Shows the full quote (text, author, source, date, tags)
|
|
- Lists all reports below: reason (or "No reason given"), reported date
|
|
- Action buttons:
|
|
- "Delete Quote" — calls DELETE /api/admin/reports/:quote_id/quote, closes modal, refreshes list
|
|
- "Hide Quote" — calls POST /api/admin/reports/:quote_id/hide, shows success, refreshes list
|
|
- "Dismiss Reports" — calls DELETE /api/admin/reports/:quote_id/reports, closes modal, refreshes list
|
|
- Close/Cancel button
|
|
|
|
## Depends on
|
|
- 6c5904 (admin moderation API endpoints)
|
|
- cb8de0 (admin auth-first flow)
|
|
|
|
## Acceptance Criteria
|
|
- [ ] Moderation tab visible on /admin after unlock
|
|
- [ ] Paginated list of reported quotes
|
|
- [ ] Report detail modal with quote + reports
|
|
- [ ] Delete, Hide, Dismiss actions work and refresh list
|
|
- [ ] Loading and error states handled
|
|
|
|
## Validation
|
|
```sh
|
|
cargo fmt && cargo check && cargo clippy
|
|
trunk build
|
|
```
|