Coolbot/moderation updates for versions changes (#4942)

* update reports message to the correct support bubble color

* update checklist to direct to new settings pages and use v3 env info

* fix: project v2 + v3 in moderation checklist funcs

* Split environment stage if project uses mixed environments.

---------

Co-authored-by: Calum H. (IMB11) <contact@cal.engineer>
This commit is contained in:
coolbot
2025-12-22 15:37:44 -08:00
committed by GitHub
parent 6a0bf5858e
commit 543bd5acf7
23 changed files with 216 additions and 140 deletions

View File

@@ -1,4 +1,4 @@
import type { Project } from '@modrinth/utils'
import type { Labrinth } from '@modrinth/api-client'
import { defineMessage, useVIntl } from '@vintl/vintl'
import type { Nag, NagContext } from '../../types/nags'
@@ -8,7 +8,7 @@ const allResolutionTags = ['8x-', '16x', '32x', '48x', '64x', '128x', '256x', '5
const MAX_TAG_COUNT = 8
function getCategories(
project: Project & { actualProjectType: string },
project: Labrinth.Projects.v2.Project & { actualProjectType: string },
tags: {
categories?: {
project_type: string
@@ -120,7 +120,7 @@ export const tagsNags: Nag[] = [
description: (context: NagContext) => {
const { formatMessage } = useVIntl()
const categoriesForProjectType = getCategories(
context.project as Project & { actualProjectType: string },
context.project as Labrinth.Projects.v2.Project & { actualProjectType: string },
context.tags,
)
const totalAvailableTags = categoriesForProjectType.length
@@ -139,7 +139,7 @@ export const tagsNags: Nag[] = [
status: 'required',
shouldShow: (context: NagContext) => {
const categoriesForProjectType = getCategories(
context.project as Project & { actualProjectType: string },
context.project as Labrinth.Projects.v2.Project & { actualProjectType: string },
context.tags,
)
const totalSelectedTags =