feat: moderation improvements (#3881)

* feat: rough draft of tool

* fix: example doc

* feat: multiselect chips

* feat: conditional actions+messaages + utils for handling conditions

* feat: migrate checklist v1 to new format.

* fix: lint issues

* fix: severity util

* feat: README.md

* feat: start implementing new moderation checklist

* feat: message assembly + fix imports

* fix: lint issues

* feat: add input suggestions

* feat: utility cleanup

* fix: icon

* chore: remove debug logging

* chore: remove debug button

* feat: modpack permissions flow into it's own component

* feat: icons + use id in stage selection button

* Support md/plain text in stages.

* fix: checklist not persisting/showing on subpages

* feat: message gen + appr/with/deny buttons

* feat: better notification placement + queue navigation

* fix: default props for futureProjects

* fix: modpack perms message

* fix: issue with future projects props

* fix: tab index + z index fixes

* feat: keybinds

* fix: file approval types

* fix: generate message for non-modpack projects

* feat: add generate message to stages dropdown

* fix: variables not expanding

* feat: requests

* fix: empty message approval

* fix: issues from sync

* chore: add comment for old moderation checklist impl

* fix: git artifacts

* fix: update visibility logic for stages and actions

* fix: cleanup logic for should show

* fix: markdown editor accidental edit
This commit is contained in:
IMB11
2025-07-11 17:09:04 +01:00
committed by GitHub
parent f7700acce4
commit 359fbd4738
73 changed files with 4337 additions and 12 deletions

View File

@@ -294,3 +294,71 @@ export type Report = {
created: string
body: string
}
// Moderation
export interface ModerationModpackPermissionApprovalType {
id:
| 'yes'
| 'no'
| 'with-attribution'
| 'unidentified'
| 'with-attribution-and-source'
| 'permanent-no'
name: string
}
export interface ModerationPermissionType {
id: 'yes' | 'no'
name: string
}
export interface ModerationBaseModpackItem {
sha1: string
file_name: string
type: 'unknown' | 'flame'
status: ModerationModpackPermissionApprovalType['id'] | null
approved: ModerationPermissionType['id'] | null
}
export interface ModerationUnknownModpackItem extends ModerationBaseModpackItem {
type: 'unknown'
proof: string
url: string
title: string
}
export interface ModerationFlameModpackItem extends ModerationBaseModpackItem {
type: 'flame'
id: string
title: string
url: string
}
export type ModerationModpackItem = ModerationUnknownModpackItem | ModerationFlameModpackItem
export interface ModerationModpackResponse {
unknown_files?: Record<string, string>
flame_files?: Record<
string,
{
file_name: string
id: string
title?: string
url?: string
}
>
}
export interface ModerationJudgement {
type: 'flame' | 'unknown'
status: string
id?: string
link?: string
title?: string
proof?: string
file_name?: string
}
export interface ModerationJudgements {
[sha1: string]: ModerationJudgement
}