feat: Moderation Dashboard Overhaul (#4059)

* feat: Moderation Dashboard Overhaul

* fix: lint issues

* fix: issues

* fix: report layout

* fix: lint

* fix: impl quick replies

* fix: remove test qr

* feat: individual report page + use new backend

* feat: memoize filtering

* feat: apply optimizations to moderation queue

* fix: lint issues

* feat: impl quick reply functionality

* fix: top level await

* fix: dep issue

* fix: dep issue x2

* fix: dep issue

* feat: intl extract

* fix: dev-187

* fix: dev-186 & review project btn

* fix: dev-176

* remove redundant moderation button from user dropdown

* correct a msg and add admin to read filter

---------

Co-authored-by: coolbot100s <76798835+coolbot100s@users.noreply.github.com>
This commit is contained in:
IMB11
2025-07-29 22:19:25 +01:00
committed by GitHub
parent c7d0839bfb
commit 6387fb21c6
43 changed files with 3114 additions and 1903 deletions

View File

@@ -0,0 +1,28 @@
import type { Project, Report, Thread, User, Version, DelphiReport } from '@modrinth/utils'
export interface OwnershipTarget {
name: string
slug: string
avatar_url?: string
type: 'user' | 'organization'
}
export interface ExtendedReport extends Report {
thread: Thread
reporter_user: User
project?: Project
user?: User
version?: Version
target?: OwnershipTarget
}
export interface ExtendedDelphiReport extends DelphiReport {
target?: OwnershipTarget
}
export interface ReportQuickReply {
label: string
message: string | ((report: ExtendedReport) => Promise<string> | string)
shouldShow?: (report: ExtendedReport) => boolean
private?: boolean
}