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

@@ -0,0 +1,28 @@
import type { Stage } from '../types/stage'
import modpackPermissionsStage from './modpack-permissions-stage'
import categories from './stages/categories'
import copyright from './stages/copyright'
import description from './stages/description'
import gallery from './stages/gallery'
import links from './stages/links'
import ruleFollowing from './stages/rule-following'
import sideTypes from './stages/side-types'
import slug from './stages/slug'
import summary from './stages/summary'
import title from './stages/title'
import versions from './stages/versions'
export default [
title,
slug,
summary,
description,
links,
categories,
sideTypes,
gallery,
versions,
copyright,
ruleFollowing,
modpackPermissionsStage,
] as ReadonlyArray<Stage>

View File

@@ -0,0 +1,45 @@
import type { KeybindListener } from '../types/keybinds'
const keybinds: KeybindListener[] = [
{
id: 'next-stage',
keybind: 'ArrowRight',
description: 'Go to next stage',
enabled: (ctx) => !ctx.state.isDone && !ctx.state.hasGeneratedMessage,
action: (ctx) => ctx.actions.tryGoNext(),
},
{
id: 'previous-stage',
keybind: 'ArrowLeft',
description: 'Go to previous stage',
enabled: (ctx) => !ctx.state.isDone && !ctx.state.hasGeneratedMessage,
action: (ctx) => ctx.actions.tryGoBack(),
},
{
id: 'generate-message',
keybind: 'Ctrl+Shift+E',
description: 'Generate moderation message',
action: (ctx) => ctx.actions.tryGenerateMessage(),
},
{
id: 'toggle-collapse',
keybind: 'Ctrl+Shift+C',
description: 'Toggle collapse/expand',
action: (ctx) => ctx.actions.tryToggleCollapse(),
},
{
id: 'reset-progress',
keybind: 'Ctrl+Shift+R',
description: 'Reset moderation progress',
action: (ctx) => ctx.actions.tryResetProgress(),
},
{
id: 'skip-project',
keybind: 'Ctrl+Shift+S',
description: 'Skip to next project',
enabled: (ctx) => ctx.state.futureProjectCount > 0 && !ctx.state.isDone,
action: (ctx) => ctx.actions.trySkipProject(),
},
]
export default keybinds

View File

@@ -0,0 +1,3 @@
## Misuse of Tags
Per section 5.1 of [Modrinth's Content Rules](https://modrinth.com/legal/rules#miscellaneous), it is important that the metadata of your projects is accurate. Including that selected tags honestly represent your project.

View File

@@ -0,0 +1,7 @@
## Reuploads are forbidden
This project appears to contain content from %ORIGINAL_PROJECT% by %ORIGINAL_AUTHOR%.
Per section 4 of [Modrinth's Content Rules](https://modrinth.com/legal/rules) this is strictly forbidden.
If you believe this is an error, or you can verify you are the creator and rightful owner of this content please let us know. Otherwise, we ask that you **do not resubmit this project**.`,

View File

@@ -0,0 +1,7 @@
## Description Accessibility
In accordance with section 2.2 of [Modrinth's Content Rules](https://modrinth.com/legal/rules) we request that `# header`s not be used as body text.
Headers are interpreted differently by screen-readers and thus should generally only be used for things like separating sections of your Description.
If you would like to emphasize a particular sentence or paragraph, instead consider using `**bold**` text using the **B** button above the text editor.

View File

@@ -0,0 +1,9 @@
## Image Descriptions
In accordance with section 2.2 of [Modrinth's Content Rules](https://modrinth.com/legal/rules) we ask that you provide a text alternative to your current Description.
It is important that your Description contains enough detail about your project that a user can have a full understanding of it from text alone.
A text-based transcription allows for those using screen readers, and users with slow internet connections unable to load images to be able to access the contents of your Description. This also acts as a backup in case the image in your Description ever goes offline for some reason.
We appreciate how much effort you put into your Description, but accessibility is important to us at Modrinth, if you would like you could put the transcription of your Description entirely in a `details` tag, so as to not spoil the visuals of your Description.

View File

@@ -0,0 +1,8 @@
## Insufficient Description
Per section 2.1 of [Modrinth's Content Rules](https://modrinth.com/legal/rules#general-expectations) your project's Description should clearly inform the reader of the content, purpose, and appeal of your project.
Currently, it looks like there are some missing details.
What does your modpack add? What features does it have? Why would a user want to download it? Be specific!
See descriptions like [Simply Optimized](https://modrinth.com/modpack/sop) or [Aged](https://modrinth.com/modpack/aged) for examples of what a good description looks like.

View File

@@ -0,0 +1,8 @@
## Insufficient Description
Per section 2.1 of [Modrinth's Content Rules](https://modrinth.com/legal/rules#general-expectations) your project's Description should clearly inform the reader of the content, purpose, and appeal of your project.
Currently, it looks like there are some missing details.
What does your project add? What features does it have? Why would a user want to download it? Be specific!
See descriptions like [Sodium](https://modrinth.com/mod/sodium) or [LambDynamicLights](https://modrinth.com/mod/lambdynamiclights) for examples of what a good description looks like.

View File

@@ -0,0 +1,7 @@
## Insufficient Description
Per section 2.1 of [Modrinth's Content Rules](https://modrinth.com/legal/rules#general-expectations) your project's Description should clearly inform the reader of the content, purpose, and appeal of your project.
Currently, it looks like there are some missing details.
> %EXPLAINER%

View File

@@ -0,0 +1,5 @@
## No English Description
Per section 2.2 of [Modrinth's Content Rules](https://modrinth.com/legal/rules#accessibility) a project's Summary and Description must be in English, unless meant exclusively for non-English use, such as translations.
You may include your non-English Description if you would like but we ask that you also add an English translation of the Description to your Description page, if you would like to use an online translator to do this, we recommend [DeepL](https://www.deepl.com/translator).

View File

@@ -0,0 +1,7 @@
## Description Accessibility
Per section 2 of [Modrinth's Content Rules](https://modrinth.com/legal/rules#clear-and-honest-function) your description must be plainly readable and accessible.
Using non-standard text characters like Zalgo or "fancy text" in place of text anywhere in your project, including the Description, Summary, or Title can make your project pages inaccessible.
This is important for users who rely on Screen Readers and for search engines in order to provide relevant results to users. Please remove any instances of this type of text.

View File

@@ -0,0 +1,7 @@
## Unfinished Description
It looks like your project Description is still a WIP (Work In Progress).
> %REASON%
Please remember to submit only when ready, as it is important your project meets the requirements of Section 2.1 of [Modrinth's Content Rules](https://modrinth.com/legal/rules#general-expectations), if you have any questions on this feel free to reach out!

View File

@@ -0,0 +1,8 @@
## Insufficient Gallery Images
We ask that projects like yours show off their content using images in the Gallery, or optionally in the Description, in order to effectively and clearly inform users of its content per section 2.1 of [Modrinth's content rules](https://modrinth.com/legal/rules#general-expectations).
Keep in mind that you should:
- Set a featured image that best represents your project.
- Ensure all your images have titles that accurately label the image, and optionally, details on the contents of the image in the images Description.
- Upload any relevant images in your Description to your Gallery tab for best results.

View File

@@ -0,0 +1,3 @@
## Unrelated Gallery Images
Per section 5.5 of [Modrinth's Content Rules](https://modrinth.com/legal/rules#miscellaneous) any images in your project's Gallery must be relevant to the project and also include a Title.

View File

@@ -0,0 +1,3 @@
## Misuse of External Resources
Per section 5.4 of [Modrinth's Content Rules](https://modrinth.com/legal/rules#miscellaneous) all links must lead to correctly labeled publicly available resources that are directly related to your project.

View File

@@ -0,0 +1,5 @@
## Unreachable Links
Per section 5.4 of [Modrinth's Content Rules](https://modrinth.com/legal/rules#miscellaneous) all links must lead to correctly labeled publicly available resources that are directly related to your project.
Currently, your %LINK% link is inaccessible!

View File

@@ -0,0 +1,5 @@
## Unreachable Links
Per section 5.4 of [Modrinth's Content Rules](https://modrinth.com/legal/rules#miscellaneous) all links must lead to correctly labeled publicly available resources that are directly related to your project.
Currently, your Source link directs to a Page Not Found error, likely because your repository is private, make sure to make your repository public before resubmitting your project!

View File

@@ -0,0 +1,5 @@
# Does not follow content rules
Our moderators have determined that your project does not follow Modrinth's Content Rules, and has been rejected.
%MESSAGE%

View File

@@ -0,0 +1,9 @@
## Environment Information
Per section 5.1 of [Modrinth's Content Rules](https://modrinth.com/legal/rules#miscellaneous), it is important that the metadata of your projects is accurate, including whether the project runs on the client or server side.
For a brief rundown of how this works:
- **Client side** refers to a mod that is only required by the client, like [Sodium](https://modrinth.com/mod/sodium).
- **Server side** mods change the behavior of the server without the client needing the mod, like Datapacks, recipes, or server-side behaviors, like [Falling Tree](https://modrinth.com/mod/fallingtree).
- A mod that adds features, entities, or new blocks and items, generally will be required on **both** the server and the client, for example [Cobblemon](https://modrinth.com/mod/cobblemon).

View File

@@ -0,0 +1,10 @@
## Incorrect Environment Information
Per section 5.1 of [Modrinth's Content Rules](https://modrinth.com/legal/rules#miscellaneous), it is important that the metadata of your projects is accurate, including whether the project runs on the client or server side.
For a brief rundown of how this works:
- Some modpacks can be client-side, usually aimed at providing utility and optimization while allowing the player to join an unmodded server, for instance, [Fabulously Optimized](https://modrinth.com/modpack/fabulously-optimized).
- Most other modpacks that change how the game is played are going to be required on both the client and server, like the modpack [Dying Light](https://modrinth.com/modpack/dying-light).
When in doubt, test for yourself or check the requirements of the mods in your pack.

View File

@@ -0,0 +1,3 @@
## Misuse of Slug
Per section 5.2 of [Modrinth's Content Rules](https://modrinth.com/legal/rules#miscellaneous) your project slug (URL) must accurately represent your project.

View File

@@ -0,0 +1,7 @@
## Insufficient Summary
Per section 5.3 of [Modrinth's Content Rules](https://modrinth.com/legal/rules#miscellaneous) your Summary can not include any extra formatting such as lists, or links.
Your project summary should provide a brief overview of your project that informs and entices users.
This is the first thing most people will see about your mod other than the Logo, so it's important it be accurate, reasonably detailed, and exciting.

View File

@@ -0,0 +1,5 @@
## Insufficient Summary
Per section 5.3 of [Modrinth's Content Rules](https://modrinth.com/legal/rules#miscellaneous) your project summary should provide a brief overview of your project that informs and entices users.
This is the first thing most people will see about your mod other than the Logo, so it's important it be accurate, reasonably detailed, and exciting.

View File

@@ -0,0 +1,5 @@
## No English Summary
Per section 2.2 of [Modrinth's Content Rules](https://modrinth.com/legal/rules#accessibility) a project's Summary and Description must be in English, unless meant exclusively for non-English use, such as translations.
You may include your non-English Summary but we ask that you also add an English translation.

View File

@@ -0,0 +1,7 @@
## Insufficient Summary
Per section 5.3 of [Modrinth's Content Rules](https://modrinth.com/legal/rules#miscellaneous) your Summary can not be the same as your project's Title.
Your project summary should provide a brief overview of your project that informs and entices users.
This is the first thing most people will see about your mod other than the Logo, so it's important it be accurate, reasonably detailed, and exciting.

View File

@@ -0,0 +1,7 @@
## Project Title
Projects must not use Minecraft's branding or include "Minecraft" as a significant part of the title.
The title of your project may be confusingly similar to the game, and we encourage you to change your title to avoid a potential violation of Minecraft's Usage Guidelines.
Abbreviations like "MC" or elaborate titles that do not make the name Minecraft a significant portion of the name are okay.

View File

@@ -0,0 +1,3 @@
## Project Branding
Per section 1.8 of [Modrinth's Content Rules](https://modrinth.com/legal/rules) we ask that you change your project title and other relevant branding to avoid causing confusion or implying association with existing projects.

View File

@@ -0,0 +1,7 @@
## Misuse of Title
Per section 5.2 of [Modrinth's Content Rules](https://modrinth.com/legal/rules#miscellaneous) we ask that you limit the title to just the name of your project.
Additional information, such as themes, tags, supported versions or loaders, etc. should be saved for the Summary or Description.
When changing your project title, remember to also ensure that your project slug (URL) matches and accurately represents your project.

View File

@@ -0,0 +1,7 @@
## Incorrect Use of Additional Files
It looks like you've uploaded multiple `mod.jar` files to one Version as Additional Files. Per section 5.7 of [Modrinth's Content Rules](https://modrinth.com/legal/rules#miscellaneous) each Version of your project must include only one `mod.jar` that corresponds to its respective Minecraft and loader versions.
This allows users to easily find and download the file they need for the version they're on with ease. The Additional Files feature can be used for things like a `Sources.jar`.
Please upload each version of your mod separately, thank you.

View File

@@ -0,0 +1,3 @@
## Modpacks on Modrinth
It looks like you've uploaded your Modpack as a `.zip`, unfortunately, this is invalid and is why your project type is "Mod". I recommend taking a look at our support page about [Modrinth Modpacks](https://support.modrinth.com/en/articles/8802250-modpacks-on-modrinth), and once you're ready feel free to resubmit your project as a `.mrpack`. Don't forget to delete the old files from your Versions!

View File

@@ -0,0 +1,3 @@
## Resource Packs on Modrinth
It looks like you've selected loaders for your Resource Pack that are causing it to be marked as a different project type. Resource Packs must only be uploaded with the "Resource Pack" loader selected. Please re-upload all versions of your resource pack and make sure to only select "Resource Pack" as the loader.

View File

@@ -0,0 +1,25 @@
import type { ModerationModpackPermissionApprovalType, Project } from '@modrinth/utils'
import type { Stage } from '../types/stage'
import { BoxIcon } from '@modrinth/assets'
export default {
id: 'modpack-permissions',
title: 'Modpack Permissions',
icon: BoxIcon,
// Replace me please.
guidance_url: 'https://docs.modrinth.com/moderation/modpack-permissions',
shouldShow: (project: Project) => project.project_type === 'modpack',
actions: [],
} as Stage
export const finalPermissionMessages: Record<
ModerationModpackPermissionApprovalType['id'],
string | undefined
> = {
yes: undefined,
'with-attribution-and-source': undefined,
'with-attribution': `The following content has attribution requirements, meaning that you must link back to the page where you originally found this content in your modpack description or version changelog (e.g. linking a mod's CurseForge page if you got it from CurseForge):`,
no: 'The following content is not allowed in Modrinth modpacks due to licensing restrictions. Please contact the author(s) directly for permission or remove the content from your modpack:',
'permanent-no': `The following content is not allowed in Modrinth modpacks, regardless of permission obtained. This may be because it breaks Modrinth's content rules or because the authors, upon being contacted for permission, have declined. Please remove the content from your modpack:`,
unidentified: `The following content could not be identified. Please provide proof of its origin along with proof that you have permission to include it:`,
}

View File

@@ -0,0 +1,24 @@
import type { Stage } from '../../types/stage'
import type { ButtonAction } from '../../types/actions'
import { TagsIcon } from '@modrinth/assets'
const categories: Stage = {
title: "Are the project's tags/categories accurate?",
id: 'tags',
icon: TagsIcon,
guidance_url: 'https://modrinth.com/legal/rules#miscellaneous',
navigate: '/settings/tags',
actions: [
{
id: 'categories_inaccurate',
type: 'button',
label: 'Inaccurate',
weight: 10,
suggestedStatus: 'flagged',
severity: 'low',
message: async () => (await import('../messages/categories/inaccurate.md?raw')).default,
} as ButtonAction,
],
}
export default categories

View File

@@ -0,0 +1,37 @@
import type { Stage } from '../../types/stage'
import type { ButtonAction } from '../../types/actions'
import { CopyrightIcon } from '@modrinth/assets'
const copyright: Stage = {
title: 'Does the author have proper permissions to post this project?',
id: 'copyright',
icon: CopyrightIcon,
guidance_url: 'https://modrinth.com/legal/rules',
actions: [
{
id: 'copyright_reupload',
type: 'button',
label: 'Re-upload',
weight: 10,
suggestedStatus: 'rejected',
severity: 'high',
message: async () => (await import('../messages/copyright/reupload.md?raw')).default,
relevantExtraInput: [
{
label: 'What is the title of the original project?',
variable: 'ORIGINAL_PROJECT',
required: true,
suggestions: ['Vanilla Tweaks'],
},
{
label: 'What is the author of the original project?',
variable: 'ORIGINAL_AUTHOR',
required: true,
suggestions: ['Vanilla Tweaks Team'],
},
],
} as ButtonAction,
],
}
export default copyright

View File

@@ -0,0 +1,107 @@
import type { Stage } from '../../types/stage'
import type { ButtonAction } from '../../types/actions'
import { LibraryIcon } from '@modrinth/assets'
const description: Stage = {
title: "Is the project's description sufficient?",
id: 'description',
icon: LibraryIcon,
guidance_url: 'https://modrinth.com/legal/rules#general-expectations',
navigate: '/',
actions: [
{
id: 'description_insufficient',
type: 'button',
label: 'Insufficient (custom)',
weight: 10,
suggestedStatus: 'flagged',
severity: 'medium',
message: async () => (await import('../messages/description/insufficient.md?raw')).default,
relevantExtraInput: [
{
label: 'Please elaborate on how the author can improve their description.',
variable: 'EXPLAINER',
large: true,
required: true,
},
],
} as ButtonAction,
{
id: 'description_insufficient_packs',
type: 'button',
label: 'Insufficient',
weight: 10,
suggestedStatus: 'flagged',
severity: 'medium',
shouldShow: (project) => project.project_type === 'modpack',
message: async () =>
(await import('../messages/description/insufficient-packs.md?raw')).default,
} as ButtonAction,
{
id: 'description_insufficient_projects',
type: 'button',
label: 'Insufficient',
weight: 10,
suggestedStatus: 'flagged',
severity: 'medium',
shouldShow: (project) => project.project_type !== 'modpack',
message: async () =>
(await import('../messages/description/insufficient-projects.md?raw')).default,
} as ButtonAction,
{
id: 'description_non_english',
type: 'button',
label: 'Non-english',
weight: 10,
suggestedStatus: 'flagged',
severity: 'medium',
message: async () => (await import('../messages/description/non-english.md?raw')).default,
} as ButtonAction,
{
id: 'description_unfinished',
type: 'button',
label: 'Unfinished',
weight: 10,
suggestedStatus: 'flagged',
severity: 'low',
message: async () => (await import('../messages/description/unfinished.md?raw')).default,
relevantExtraInput: [
{
label: 'Please specify the reason the description appears unfinished.',
variable: 'REASON',
required: true,
},
],
} as ButtonAction,
{
id: 'description_headers_as_body',
type: 'button',
label: 'Headers as body text',
weight: 10,
suggestedStatus: 'flagged',
severity: 'low',
message: async () => (await import('../messages/description/headers-as-body.md?raw')).default,
} as ButtonAction,
{
id: 'description_image_only',
type: 'button',
label: 'Image-only',
weight: 10,
suggestedStatus: 'flagged',
severity: 'medium',
message: async () => (await import('../messages/description/image-only.md?raw')).default,
} as ButtonAction,
{
id: 'description_non_standard_text',
type: 'button',
label: 'Non-standard text',
weight: 10,
suggestedStatus: 'flagged',
severity: 'medium',
message: async () =>
(await import('../messages/description/non-standard-text.md?raw')).default,
} as ButtonAction,
],
}
export default description

View File

@@ -0,0 +1,33 @@
import type { Stage } from '../../types/stage'
import type { ButtonAction } from '../../types/actions'
import { ImageIcon } from '@modrinth/assets'
const gallery: Stage = {
title: "Are this project's gallery images sufficient?",
id: 'gallery',
icon: ImageIcon,
guidance_url: 'https://modrinth.com/legal/rules#general-expectations',
navigate: '/gallery',
actions: [
{
id: 'gallery_insufficient',
type: 'button',
label: 'Insufficient',
weight: 10,
suggestedStatus: 'flagged',
severity: 'low',
message: async () => (await import('../messages/gallery/insufficient.md?raw')).default,
} as ButtonAction,
{
id: 'gallery_not_relevant',
type: 'button',
label: 'Not relevant',
weight: 10,
suggestedStatus: 'flagged',
severity: 'low',
message: async () => (await import('../messages/gallery/not-relevant.md?raw')).default,
} as ButtonAction,
],
}
export default gallery

View File

@@ -0,0 +1,49 @@
import type { Stage } from '../../types/stage'
import type { ButtonAction } from '../../types/actions'
import { LinkIcon } from '@modrinth/assets'
const links: Stage = {
title: "Are the project's links accessible and not misleading?",
id: 'links',
icon: LinkIcon,
guidance_url: 'https://modrinth.com/legal/rules#miscellaneous',
navigate: '/settings/links',
actions: [
{
id: 'links_misused',
type: 'button',
label: 'Links are misused',
weight: 10,
suggestedStatus: 'flagged',
severity: 'low',
message: async () => (await import('../messages/links/misused.md?raw')).default,
} as ButtonAction,
{
id: 'links_not_accessible_source',
type: 'button',
label: 'Not accessible (source)',
weight: 10,
suggestedStatus: 'flagged',
severity: 'low',
message: async () => (await import('../messages/links/not-accessible-source.md?raw')).default,
} as ButtonAction,
{
id: 'links_not_accessible_other',
type: 'button',
label: 'Not accessible (other)',
weight: 10,
suggestedStatus: 'flagged',
severity: 'low',
message: async () => (await import('../messages/links/not-accessible-other.md?raw')).default,
relevantExtraInput: [
{
label: 'Please specify the link type that is inaccessible.',
variable: 'LINK',
required: true,
},
],
} as ButtonAction,
],
}
export default links

View File

@@ -0,0 +1,32 @@
import type { Stage } from '../../types/stage'
import type { ButtonAction } from '../../types/actions'
import { ListBulletedIcon } from '@modrinth/assets'
const ruleFollowing: Stage = {
title: 'Does this project break our content rules?',
id: 'rule-following',
icon: ListBulletedIcon,
guidance_url: 'https://modrinth.com/legal/rules',
navigate: '/',
actions: [
{
id: 'rule_breaking_yes',
type: 'button',
label: 'Yes',
weight: 10,
suggestedStatus: 'rejected',
severity: 'critical',
message: async () => (await import('../messages/rule-breaking.md?raw')).default,
relevantExtraInput: [
{
label: 'Please explain to the user how it infringes on our content rules.',
variable: 'MESSAGE',
required: true,
large: true,
},
],
} as ButtonAction,
],
}
export default ruleFollowing

View File

@@ -0,0 +1,36 @@
import type { Stage } from '../../types/stage'
import type { ButtonAction } from '../../types/actions'
import { GlobeIcon } from '@modrinth/assets'
const sideTypes: Stage = {
title: "Is the project's environment information accurate?",
id: 'environment',
icon: GlobeIcon,
guidance_url: 'https://modrinth.com/legal/rules#miscellaneous',
navigate: '/settings#side-types',
actions: [
{
id: 'side_types_inaccurate_modpack',
type: 'button',
label: 'Inaccurate (modpack)',
weight: 10,
suggestedStatus: 'flagged',
severity: 'low',
shouldShow: (project) => project.project_type === 'modpack',
message: async () =>
(await import('../messages/side-types/inaccurate-modpack.md?raw')).default,
} as ButtonAction,
{
id: 'side_types_inaccurate_mod',
type: 'button',
label: 'Inaccurate (mod)',
weight: 10,
suggestedStatus: 'flagged',
severity: 'low',
shouldShow: (project) => project.project_type === 'mod',
message: async () => (await import('../messages/side-types/inaccurate-mod.md?raw')).default,
} as ButtonAction,
],
}
export default sideTypes

View File

@@ -0,0 +1,23 @@
import { HashIcon } from '@modrinth/assets'
import type { Stage } from '../../types/stage'
const slugStage: Stage = {
title: 'Is the slug accurate and appropriate?',
id: 'slug',
icon: HashIcon,
guidance_url: 'https://modrinth.com/legal/rules#miscellaneous',
navigate: '/settings',
actions: [
{
id: 'slug_misused',
type: 'button',
label: 'Misused',
weight: 100,
suggestedStatus: 'flagged',
severity: 'low',
message: async () => (await import('../messages/slug/misused.md?raw')).default,
},
],
}
export default slugStage

View File

@@ -0,0 +1,50 @@
import type { Stage } from '../../types/stage'
import type { ButtonAction } from '../../types/actions'
import { AlignLeftIcon } from '@modrinth/assets'
const summary: Stage = {
title: "Is the project's summary sufficient?",
id: 'summary',
icon: AlignLeftIcon,
guidance_url: 'https://modrinth.com/legal/rules#miscellaneous',
actions: [
{
id: 'summary_insufficient',
type: 'button',
label: 'Insufficient',
weight: 10,
suggestedStatus: 'flagged',
severity: 'low',
message: async () => (await import('../messages/summary/insufficient.md?raw')).default,
} as ButtonAction,
{
id: 'summary_repeat_title',
type: 'button',
label: 'Repeat of title',
weight: 10,
suggestedStatus: 'flagged',
severity: 'low',
message: async () => (await import('../messages/summary/repeat-title.md?raw')).default,
} as ButtonAction,
{
id: 'summary_formatting',
type: 'button',
label: 'Formatting',
weight: 10,
suggestedStatus: 'flagged',
severity: 'low',
message: async () => (await import('../messages/summary/formatting.md?raw')).default,
} as ButtonAction,
{
id: 'summary_non_english',
type: 'button',
label: 'Non-english',
weight: 10,
suggestedStatus: 'flagged',
severity: 'medium',
message: async () => (await import('../messages/summary/non-english.md?raw')).default,
} as ButtonAction,
],
}
export default summary

View File

@@ -0,0 +1,41 @@
import { BookOpenIcon } from '@modrinth/assets'
import type { Stage } from '../../types/stage'
const titleStage: Stage = {
title: 'Is this title free of useless information?',
text: async () => '**Title:** `%PROJECT_TITLE%`',
id: 'title',
icon: BookOpenIcon,
guidance_url: 'https://modrinth.com/legal/rules#miscellaneous',
actions: [
{
id: 'title_useless_info',
type: 'button',
label: 'Contains useless info',
weight: 100,
suggestedStatus: 'flagged',
severity: 'low',
message: async () => (await import('../messages/title/useless-info.md?raw')).default,
},
{
id: 'title_minecraft_branding',
type: 'button',
label: 'Minecraft title',
weight: 100,
suggestedStatus: 'flagged',
severity: 'medium',
message: async () => (await import('../messages/title/minecraft-branding.md?raw')).default,
},
{
id: 'title_similarities',
type: 'button',
label: 'Title similarities',
weight: 100,
suggestedStatus: 'flagged',
severity: 'medium',
message: async () => (await import('../messages/title/similarities.md?raw')).default,
},
],
}
export default titleStage

View File

@@ -0,0 +1,46 @@
import type { Stage } from '../../types/stage'
import type { ButtonAction } from '../../types/actions'
import { VersionIcon } from '@modrinth/assets'
const versions: Stage = {
title: "Are these project's files correct?",
id: 'versions',
icon: VersionIcon,
guidance_url: 'https://modrinth.com/legal/rules#miscellaneous',
navigate: '/versions',
actions: [
{
id: 'versions_incorrect_additional',
type: 'button',
label: 'Incorrect additional files',
weight: 10,
suggestedStatus: 'flagged',
severity: 'medium',
message: async () =>
(await import('../messages/versions/incorrect-additional-files.md?raw')).default,
} as ButtonAction,
{
id: 'versions_invalid_modpacks',
type: 'button',
label: 'Invalid file type (modpacks)',
weight: 10,
suggestedStatus: 'rejected',
severity: 'medium',
shouldShow: (project) => project.project_type === 'modpack',
message: async () => (await import('../messages/versions/invalid-modpacks.md?raw')).default,
} as ButtonAction,
{
id: 'versions_invalid_resourcepacks',
type: 'button',
label: 'Invalid file type (resourcepacks)',
weight: 10,
suggestedStatus: 'rejected',
severity: 'medium',
shouldShow: (project) => project.project_type === 'resourcepack',
message: async () =>
(await import('../messages/versions/invalid-resourcepacks.md?raw')).default,
} as ButtonAction,
],
}
export default versions