feat: handle geyser extension (#5582)

* feat: add geyser extension detection

* feat: only show geyser if inferred
This commit is contained in:
Truman Gao
2026-03-16 05:52:16 -07:00
committed by GitHub
parent 01c9dee612
commit 7fa0a277c6
3 changed files with 18 additions and 3 deletions

View File

@@ -45,9 +45,10 @@ import { Chips, FormattedTag, TagItem } from '@modrinth/ui'
const selectedLoaders = defineModel<string[]>({ default: [] })
const { loaders } = defineProps<{
const { loaders, includeGeyser } = defineProps<{
loaders: Labrinth.Tags.v2.Loader[]
toggleLoader: (loader: string) => void
includeGeyser?: boolean
}>()
const loaderGroup = ref<GroupLabels>('mods')
@@ -92,7 +93,7 @@ function groupLoaders(loaders: Labrinth.Tags.v2.Loader[]) {
'bungeecord',
'velocity',
'waterfall',
'geyser',
...(includeGeyser ? ['geyser'] : []),
]
const SHADER_SORT = ['optifine', 'iris', 'canvas', 'vanilla']

View File

@@ -4,6 +4,7 @@
v-model="draftVersion.loaders"
:loaders="generatedState.loaders"
:toggle-loader="toggleLoader"
:include-geyser="includeGeyser"
/>
<div v-if="draftVersion.loaders.length" class="space-y-1">
@@ -52,7 +53,9 @@ const generatedState = useGeneratedState()
const loaders = computed(() => generatedState.value.loaders)
const { draftVersion } = injectManageVersionContext()
const { draftVersion, inferredVersionData } = injectManageVersionContext()
const includeGeyser = computed(() => inferredVersionData.value?.loaders?.includes('geyser'))
const toggleLoader = (loader: string) => {
if (draftVersion.value.loaders.includes(loader)) {