Remove legacy formatCategory (#5280)

* Remove legacy formatCategory

* prepr
This commit is contained in:
Prospector
2026-02-02 10:20:23 -08:00
committed by GitHub
parent f81f951814
commit 56c8bb1950
6 changed files with 18 additions and 66 deletions

View File

@@ -19,7 +19,7 @@
Platform
</slot>
<template #option="{ option }">
{{ formatCategory(option) }}
{{ formatLoader(formatMessage, String(option)) }}
</template>
<template v-if="hasAnyUnsupportedPlatforms" #footer>
<Checkbox
@@ -58,12 +58,15 @@
<script setup lang="ts">
import { FilterIcon } from '@modrinth/assets'
import { formatLoader, useVIntl } from '@modrinth/ui'
import Checkbox from '@modrinth/ui/src/components/base/Checkbox.vue'
import ManySelect from '@modrinth/ui/src/components/base/ManySelect.vue'
import { formatCategory, type GameVersionTag, type Version } from '@modrinth/utils'
import type { GameVersionTag, Version } from '@modrinth/utils'
import { computed, ref } from 'vue'
import { useRoute } from 'vue-router'
const { formatMessage } = useVIntl()
export type ListedGameVersion = {
name: string
release: boolean
@@ -119,7 +122,7 @@ const hasOnlyUnsupportedPlatforms = computed(() => {
const showSupportedPlatformsOnly = ref(true)
const filterOptions = computed(() => {
const filterOptions = computed<Record<'gameVersion' | 'platform', string[]>>(() => {
const filters: Record<'gameVersion' | 'platform', string[]> = {
gameVersion: [],
platform: [],