1
0

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,3 @@
Unfortunately, anti-virus software has consistently been found to be an unreliable tool for Minecraft mods.
If you have evidence of malicious activity concerning a specific mod, or of malicious code decompiled from a mod on Modrinth, please create a new Report and provide the required details, thank you.

View File

@@ -0,0 +1,3 @@
Thank you for your report.
This project was confirmed to be malicious after a detailed investigation. Luckily, thanks to your report and quick action from our team, we have reason to believe this did not impact a significant amount of users and we have taken precautions to prevent this malicious code from appearing on Modrinth again.

View File

@@ -0,0 +1,6 @@
Unfortunately, the Moderation team is unable to assist with your issue.
The reporting system is exclusively for reporting issues to Moderation staff; only violations of [Modrinth's Content Rules](https://modrinth.com/legal/rules) should be reported. The members of the project you're reporting do not see that you have submitted a report.
If you are having issues with crashes, please check out [our FAQ section](https://support.modrinth.com/aen/articles/8792916) to learn how to diagnose and fix crashes.
For other project-specific issues consider asking the project's own community, check for a Discord or Issues link on the project page.

View File

@@ -0,0 +1,5 @@
Unfortunately, the Moderation team is unable to assist with your issue.
The reporting system is exclusively for reporting issues to Moderation staff; only violations of [Modrinth's Content Rules](https://modrinth.com/legal/rules) should be reported.
Please reach out to the [Modrinth Help Center](https://support.modrinth.com/) so we can better assist you and bring up your concerns with our platform tean,

View File

@@ -0,0 +1,3 @@
The reporting system is exclusively for reporting issues to Modrinth staff; only violations of [Modrinth's Content Rules](https://modrinth.com/legal/rules) should be reported. The members of the project you're reporting do not see that you have submitted a report.
Please ensure you are using the Reports system appropriately, repeated misuse may result in account suspension.

View File

@@ -0,0 +1,3 @@
We haven't received a response in some time, so we're closing this report thread.
If you have additional information to share we ask that you create a new report.

View File

@@ -0,0 +1,34 @@
import type { ReportQuickReply } from '../types/reports'
export default [
{
label: 'Antivirus',
message: async () => (await import('./messages/reports/antivirus.md?raw')).default,
private: false,
},
{
label: 'Spam',
message: async () => (await import('./messages/reports/spam.md?raw')).default,
private: false,
},
{
label: 'Gameplay Issue',
message: async () => (await import('./messages/reports/gameplay-issue.md?raw')).default,
private: false,
},
{
label: 'Platform Issue',
message: async () => (await import('./messages/reports/platform-issue.md?raw')).default,
private: false,
},
{
label: 'Stale',
message: async () => (await import('./messages/reports/stale.md?raw')).default,
private: false,
},
{
label: 'Confirmed Malware',
message: async () => (await import('./messages/reports/confirmed-malware.md?raw')).default,
private: false,
},
] as ReadonlyArray<ReportQuickReply>

View File

@@ -68,7 +68,7 @@ const versions: Stage = {
message: async () => '',
enablesActions: [
{
id: 'versions_incorrect_project_type_options',
id: 'versions_alternate_versions_options',
type: 'dropdown',
label: 'How are the alternate versions distributed?',
options: [

View File

@@ -2,8 +2,10 @@ export * from './types/actions'
export * from './types/messages'
export * from './types/stage'
export * from './types/keybinds'
export * from './types/reports'
export * from './utils'
export { finalPermissionMessages } from './data/modpack-permissions-stage'
export { finalPermissionMessages } from './data/modpack-permissions-stage'
export { default as checklist } from './data/checklist'
export { default as keybinds } from './data/keybinds'
export { default as reportQuickReplies } from './data/report-quick-replies'

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
}