feat(moderation): resource-centric reported comments/events pages

Rework 内容审核 pages around reported resources instead of individual
reports, matching the new backend endpoints: rows group all reports on
one comment/event, with a slide-over listing report details and
per-row actions 通过并屏蔽 (approve) / 驳回举报 (reject) / 撤销屏蔽
(revert). Filters: 待处理 / 已屏蔽 / 全部.

Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
2026-07-11 14:20:37 +08:00
co-authored by Claude Fable 5
parent 999d5353fd
commit f5a7249969
9 changed files with 532 additions and 381 deletions
+23 -21
View File
@@ -292,36 +292,38 @@ export interface ReportUser {
display_name?: string | null
}
export interface CommentReport {
export interface ResourceReport {
id: number
comment_id: number
reason: string
message?: string | null
status: ReportStatus
reporter?: ReportUser | null
created_at: string
handled_at?: string | null
handled_by?: ReportUser | null
reporter?: ReportUser | null
comment?: {
id: number
body?: string | null
status?: string
author?: ReportUser | null
} | null
}
export interface FileXEventReport {
id: number
interface ReportedResourceBase {
kind?: string
event_id: number
reason: string
message?: string | null
status: ReportStatus
created_at: string
handled_at?: string | null
handled_by?: ReportUser | null
reporter?: ReportUser | null
event?: { id: number; title?: string | null } | null
id: number
is_blocked: boolean
blocked_at?: string | null
blocked_by_uid?: string | null
author?: ReportUser | null
open_reports_count: number
latest_report_at?: string | null
reports: ResourceReport[]
created_at?: string
}
export interface ReportedComment extends ReportedResourceBase {
body?: string | null
body_format?: string
status?: string
}
export interface ReportedEvent extends ReportedResourceBase {
title?: string | null
visibility?: string
}
export type DimzouTranslationStatus = 'draft' | 'awaiting_publish' | 'published'