fix some issues with latest PRs (#5242)
This commit is contained in:
@@ -458,9 +458,11 @@ function getMessages() {
|
||||
}
|
||||
|
||||
function getLoaderCategories(ver) {
|
||||
return tags.value.loaders.filter((loader) => {
|
||||
return ver?.loaders?.includes(loader.name)
|
||||
})
|
||||
return tags.value.loaders
|
||||
.filter((loader) => {
|
||||
return ver?.loaders?.includes(loader.name)
|
||||
})
|
||||
.map((loader) => loader.name)
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -225,7 +225,7 @@
|
||||
? formatMessage(messages.gameVersionUnsupportedTooltip, {
|
||||
title: project.title,
|
||||
gameVersion: gameVersion,
|
||||
platform: formatCategory(currentPlatform),
|
||||
platform: currentPlatformText,
|
||||
})
|
||||
: null
|
||||
"
|
||||
@@ -277,7 +277,7 @@
|
||||
{{
|
||||
currentPlatform
|
||||
? formatMessage(messages.platformLabel, {
|
||||
platform: formatCategory(currentPlatform),
|
||||
platform: currentPlatformText,
|
||||
})
|
||||
: formatMessage(messages.platformError)
|
||||
}}
|
||||
@@ -285,7 +285,7 @@
|
||||
v-tooltip="
|
||||
formatMessage(messages.platformTooltip, {
|
||||
title: project.title,
|
||||
platform: formatCategory(currentPlatform),
|
||||
platform: currentPlatformText,
|
||||
})
|
||||
"
|
||||
class="ml-auto size-5"
|
||||
@@ -309,7 +309,7 @@
|
||||
{{
|
||||
currentPlatform
|
||||
? formatMessage(messages.platformLabel, {
|
||||
platform: formatCategory(currentPlatform),
|
||||
platform: currentPlatformText,
|
||||
})
|
||||
: formatMessage(messages.selectPlatform)
|
||||
}}
|
||||
@@ -325,7 +325,7 @@
|
||||
!possiblePlatforms.includes(platform)
|
||||
? formatMessage(messages.platformUnsupportedTooltip, {
|
||||
title: project.title,
|
||||
platform: formatCategory(platform),
|
||||
platform: currentPlatformText,
|
||||
gameVersion: currentGameVersion,
|
||||
})
|
||||
: null
|
||||
@@ -357,7 +357,7 @@
|
||||
}
|
||||
"
|
||||
>
|
||||
{{ formatCategory(platform) }}
|
||||
{{ formatMessage(getTagMessage(platform, 'loader')) }}
|
||||
<CheckIcon v-if="userSelectedPlatform === platform" />
|
||||
</button>
|
||||
</ButtonStyled>
|
||||
@@ -395,7 +395,7 @@
|
||||
{{
|
||||
formatMessage(messages.noVersionsAvailable, {
|
||||
gameVersion: currentGameVersion,
|
||||
platform: formatCategory(currentPlatform),
|
||||
platform: currentPlatformText,
|
||||
})
|
||||
}}
|
||||
</p>
|
||||
@@ -956,6 +956,7 @@ import {
|
||||
Checkbox,
|
||||
commonMessages,
|
||||
defineMessages,
|
||||
getTagMessage,
|
||||
injectModrinthClient,
|
||||
injectNotificationManager,
|
||||
IntlFormatted,
|
||||
@@ -1061,6 +1062,10 @@ const currentPlatform = computed(() => {
|
||||
)
|
||||
})
|
||||
|
||||
const currentPlatformText = computed(() =>
|
||||
formatMessage(getTagMessage(currentPlatform.value, 'loader')),
|
||||
)
|
||||
|
||||
const releaseVersions = computed(() => {
|
||||
const set = new Set()
|
||||
for (const gv of tags.value.gameVersions || []) {
|
||||
|
||||
@@ -213,7 +213,10 @@
|
||||
</div>
|
||||
</template>
|
||||
<template #sidebar>
|
||||
<SidebarCard v-if="collection.description" :title="formatMessage(messages.descriptionLabel)">
|
||||
<SidebarCard
|
||||
v-if="collection.description"
|
||||
:title="formatMessage(commonMessages.descriptionLabel)"
|
||||
>
|
||||
<p class="m-0">{{ collection.description }}</p>
|
||||
</SidebarCard>
|
||||
<SidebarCard
|
||||
|
||||
Reference in New Issue
Block a user