fix text in license and links stages (#4010)

* fix text in license and links stages, change a license option to conditional

* remove unused project definition

* Switch markdown to use <br />

---------

Co-authored-by: Prospector <prospectordev@gmail.com>
This commit is contained in:
coolbot 2025-07-16 19:05:00 -08:00 committed by GitHub
parent 56c556821b
commit c20b869e62
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 18 additions and 32 deletions

View File

@ -15,6 +15,7 @@
"app:intl:extract": "pnpm run --filter=@modrinth/app-frontend intl:extract", "app:intl:extract": "pnpm run --filter=@modrinth/app-frontend intl:extract",
"blog:fix": "turbo run fix --filter=@modrinth/blog", "blog:fix": "turbo run fix --filter=@modrinth/blog",
"pages:build": "NITRO_PRESET=cloudflare-pages pnpm --filter frontend run build", "pages:build": "NITRO_PRESET=cloudflare-pages pnpm --filter frontend run build",
"moderation:fix": "turbo run fix --filter=@modrinth/moderation",
"build": "turbo run build --continue", "build": "turbo run build --continue",
"lint": "turbo run lint --continue", "lint": "turbo run lint --continue",
"test": "turbo run test --continue", "test": "turbo run test --continue",

View File

@ -1 +0,0 @@
**License id:** %PROJECT_LICENSE_ID% \

View File

@ -1 +1,2 @@
**License id:** %PROJECT_LICENSE_ID% \
**License Link:** %PROJECT_LICENSE_URL% **License Link:** %PROJECT_LICENSE_URL%

View File

@ -1 +1 @@
> **{PLATFORM}:** {URL} > **{PLATFORM}:** {URL}<br />

View File

@ -1 +1,2 @@
<u>**Donation Links:**</u> <br />
<u>**Donation Links:**</u><br />

View File

@ -20,14 +20,7 @@ const licensesNotRequiringSource: string[] = [
const licenseStage: Stage = { const licenseStage: Stage = {
title: 'Is this license and link valid?', title: 'Is this license and link valid?',
text: async (project) => { text: async () => (await import('../messages/checklist-text/licensing.md?raw')).default,
let text = ''
text += (await import('../messages/checklist-text/license/id.md?raw')).default
if (project.license.url)
text += (await import('../messages/checklist-text/license/link.md?raw')).default
return text
},
id: 'license', id: 'license',
icon: BookTextIcon, icon: BookTextIcon,
guidance_url: 'https://modrinth.com/legal/rules#miscellaneous', guidance_url: 'https://modrinth.com/legal/rules#miscellaneous',
@ -55,33 +48,24 @@ const licenseStage: Stage = {
}, },
], ],
}, },
// {
// id: 'license_no_source',
// type: 'conditional-button',
// label: 'No Source',
// fallbackWeight: 602,
// suggestedStatus: 'rejected',
// severity: 'medium',
// fallbackMessage: async () => (await import('../messages/license/no_source.md?raw')).default,
// messageVariants: [
// {
// conditions: {
// requiredActions: ['reupload_unclear_fork'],
// },
// weight: 602,
// message: async () => (await import('../messages/license/no_source-fork.md?raw')).default,
// },
// ],
// },
{ {
id: 'license_no_source', id: 'license_no_source',
type: 'button', type: 'conditional-button',
label: 'No Source', label: 'No Source',
weight: 602,
suggestedStatus: 'rejected', suggestedStatus: 'rejected',
severity: 'medium', severity: 'medium',
shouldShow: (project) => !licensesNotRequiringSource.includes(project.license.id), shouldShow: (project) => !licensesNotRequiringSource.includes(project.license.id),
message: async () => (await import('../messages/license/no_source.md?raw')).default, messageVariants: [
{
conditions: {
excludedActions: ['license_no_source-fork'],
},
weight: 602,
message: async () => (await import('../messages/license/no_source.md?raw')).default,
},
],
fallbackWeight: 602,
fallbackMessage: async () => '',
enablesActions: [ enablesActions: [
{ {
id: 'license_no_source-fork', id: 'license_no_source-fork',