fix: issues
This commit is contained in:
parent
54cfe29f7d
commit
dc258de3c2
@ -153,7 +153,7 @@ export const descriptionNags: Nag[] = [
|
|||||||
defineMessage({
|
defineMessage({
|
||||||
id: 'nags.summary-too-short.description',
|
id: 'nags.summary-too-short.description',
|
||||||
defaultMessage:
|
defaultMessage:
|
||||||
"Your summary is {length} characters. It's recommended to have at least {minChars} characters to provide users with enough information about your project.",
|
'Your summary is {length} characters. It should ideally be around {minChars} characters, one short sentence about your project.',
|
||||||
}),
|
}),
|
||||||
{
|
{
|
||||||
length: context.project.description?.length || 0,
|
length: context.project.description?.length || 0,
|
||||||
|
|||||||
@ -27,8 +27,8 @@ export const commonLinkDomains = {
|
|||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isCommonUrl(url: string | undefined, commonDomains: string[]): boolean {
|
export function isCommonUrl(url: string | null, commonDomains: string[]): boolean {
|
||||||
if (!url) return false
|
if (url === null || url === '') return true
|
||||||
try {
|
try {
|
||||||
const domain = new URL(url).hostname.toLowerCase()
|
const domain = new URL(url).hostname.toLowerCase()
|
||||||
return commonDomains.some((allowed) => domain.includes(allowed))
|
return commonDomains.some((allowed) => domain.includes(allowed))
|
||||||
@ -37,8 +37,8 @@ export function isCommonUrl(url: string | undefined, commonDomains: string[]): b
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isUncommonLicenseUrl(url: string | undefined, domains: string[]): boolean {
|
export function isUncommonLicenseUrl(url: string | null, domains: string[]): boolean {
|
||||||
if (!url) return false
|
if (url === null || url === '') return false
|
||||||
try {
|
try {
|
||||||
const domain = new URL(url).hostname.toLowerCase()
|
const domain = new URL(url).hostname.toLowerCase()
|
||||||
return domains.some((uncommonDomain) => domain.includes(uncommonDomain))
|
return domains.some((uncommonDomain) => domain.includes(uncommonDomain))
|
||||||
|
|||||||
@ -130,7 +130,10 @@ export const tagsNags: Nag[] = [
|
|||||||
)
|
)
|
||||||
const totalSelectedTags =
|
const totalSelectedTags =
|
||||||
context.project.categories.length + (context.project.additional_categories?.length || 0)
|
context.project.categories.length + (context.project.additional_categories?.length || 0)
|
||||||
return totalSelectedTags === categoriesForProjectType.length
|
return (
|
||||||
|
totalSelectedTags === categoriesForProjectType.length &&
|
||||||
|
context.project.project_type !== 'project'
|
||||||
|
)
|
||||||
},
|
},
|
||||||
link: {
|
link: {
|
||||||
path: 'settings/tags',
|
path: 'settings/tags',
|
||||||
|
|||||||
@ -18,7 +18,7 @@ export type DonationPlatform =
|
|||||||
| { short: 'ko-fi'; name: 'Ko-fi' }
|
| { short: 'ko-fi'; name: 'Ko-fi' }
|
||||||
| { short: 'other'; name: 'Other' }
|
| { short: 'other'; name: 'Other' }
|
||||||
|
|
||||||
export type ProjectType = 'mod' | 'modpack' | 'resourcepack' | 'shader'
|
export type ProjectType = 'mod' | 'modpack' | 'resourcepack' | 'shader' | 'project'
|
||||||
export type MonetizationStatus = 'monetized' | 'demonetized' | 'force-demonetized'
|
export type MonetizationStatus = 'monetized' | 'demonetized' | 'force-demonetized'
|
||||||
|
|
||||||
export type GameVersion = string
|
export type GameVersion = string
|
||||||
@ -69,10 +69,10 @@ export interface Project {
|
|||||||
thread_id: ModrinthId
|
thread_id: ModrinthId
|
||||||
organization: ModrinthId
|
organization: ModrinthId
|
||||||
|
|
||||||
issues_url?: string
|
issues_url: string | null
|
||||||
source_url?: string
|
source_url: string | null
|
||||||
wiki_url?: string
|
wiki_url: string | null
|
||||||
discord_url?: string
|
discord_url: string | null
|
||||||
donation_urls: DonationLink<DonationPlatform>[]
|
donation_urls: DonationLink<DonationPlatform>[]
|
||||||
|
|
||||||
published: string
|
published: string
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user