Moderation improvements post server projects launch (#5485)

* identical links nag + use V3 more

* updater status alerts

* identity verification msg for servers

* private use msg for server projects

* fix newlines in some messages

* Tweak + add description messages

* tweak status alerts

* flinks for summary messages

* Rule 4 msgs for servers

* account for some jank

* fixes

* Project Type placeholder

* update locales

* add button for rejecting pay to play servers

* update country to region

* add lowercase option for project type placeholders

* update link of article to the published url

* prepr

---------

Co-authored-by: Prospector <6166773+Prospector@users.noreply.github.com>
This commit is contained in:
coolbot
2026-03-06 17:58:28 -08:00
committed by GitHub
parent 20cbe1ad8f
commit 98175a58a6
33 changed files with 350 additions and 111 deletions

View File

@@ -78,15 +78,12 @@ export const linksNags: Nag[] = [
'Add any relevant links targeted outside of Modrinth, such as source code, an issue tracker, or a Discord invite.',
}),
status: 'suggestion',
shouldShow: (context: NagContext) =>
!context.projectV3?.minecraft_server &&
!(
context.project.issues_url ||
context.project.source_url ||
context.project.wiki_url ||
context.project.discord_url ||
context.project.donation_urls?.length
),
shouldShow: (context: NagContext) => {
return (
!context.projectV3?.minecraft_server &&
Object.keys(context.projectV3?.link_urls ?? {}).length === 0
)
},
link: {
path: 'settings/links',
title: defineMessage({
@@ -109,11 +106,9 @@ export const linksNags: Nag[] = [
}),
status: 'suggestion',
shouldShow: (context: NagContext) => {
return !(
context.projectV3?.link_urls?.site?.url ||
context.projectV3?.link_urls?.store?.url ||
context.projectV3?.link_urls?.discord?.url ||
context.projectV3?.link_urls?.wiki?.url
return (
!!context.projectV3?.minecraft_server &&
Object.keys(context.projectV3?.link_urls ?? {}).length === 0
)
},
link: {
@@ -125,6 +120,30 @@ export const linksNags: Nag[] = [
shouldShow: (context: NagContext) => context.currentRoute !== 'type-id-settings-links',
},
},
{
id: 'identical-links',
title: defineMessage({
id: 'nags.identical-links.title',
defaultMessage: 'Identical Links',
}),
description: defineMessage({
id: 'nags.identical-links.description',
defaultMessage:
'Some of your external links appear to be identical. Each link should be entered only once and with the appropriate link type.',
}),
status: 'required',
shouldShow: (context: NagContext) =>
new Set(Object.values(context.projectV3?.link_urls ?? {}).map((link) => link.url)).size !==
Object.values(context.projectV3?.link_urls ?? {}).map((link) => link.url).length,
link: {
path: 'settings/links',
title: defineMessage({
id: 'nags.settings.links.title',
defaultMessage: 'Visit links settings',
}),
shouldShow: (context: NagContext) => context.currentRoute !== 'type-id-settings-links',
},
},
{
id: 'verify-external-links',
title: defineMessage({

View File

@@ -6,11 +6,11 @@ export const serverProjectsNags: Nag[] = [
id: 'select-country',
title: defineMessage({
id: 'nags.select-country.title',
defaultMessage: 'Select a country',
defaultMessage: 'Select a region',
}),
description: defineMessage({
id: 'nags.select-country.description',
defaultMessage: 'Let players know what country your server is located in.',
defaultMessage: 'Let players know what region your server is located in.',
}),
status: 'required',
shouldShow: (context: NagContext) =>