fix: disable unsupported mods

Also hotfix amdaemon crashing
This commit is contained in:
2025-04-15 07:32:18 +00:00
parent f588892b05
commit ac18c34895
3 changed files with 30 additions and 11 deletions

View File

@ -26,19 +26,31 @@ const model = computed({
await prf.togglePkg(props.pkg, value);
},
});
const unsupported = computed(() => props.pkg!.loc!.status === 'Unsupported');
if (unsupported.value === true && model.value === true) {
prf.togglePkg(props.pkg, false);
}
</script>
<template>
<div class="flex items-center">
<ModTitlecard show-version show-icon show-description :pkg="pkg" />
<UpdateButton :pkg="pkg" />
<ToggleSwitch
v-if="hasFeature(pkg, Feature.Mod)"
class="scale-[1.33] shrink-0"
inputId="switch"
:disabled="pkg!.loc!.status === 'Unsupported'"
v-model="model"
/>
<span
v-tooltip="
unsupported && 'This package is not compatible with STARTLINER.'
"
>
<ToggleSwitch
v-if="hasFeature(pkg, Feature.Mod) || unsupported === true"
class="scale-[1.33] shrink-0"
inputId="switch"
:disabled="unsupported === true"
v-model="model"
/>
</span>
<InstallButton :pkg="pkg" />
<Button
rounded