fix: broken list

This commit is contained in:
2025-03-17 02:26:17 +00:00
parent af4929a5b3
commit fe1a32f31b
7 changed files with 23 additions and 20 deletions

View File

@ -8,7 +8,8 @@ import LinkButton from './LinkButton.vue';
import ModTitlecard from './ModTitlecard.vue';
import UpdateButton from './UpdateButton.vue';
import { usePkgStore, usePrfStore } from '../stores';
import { Package } from '../types';
import { Feature, Package } from '../types';
import { hasFeature } from '../util';
const prf = usePrfStore();
const pkgs = usePkgStore();
@ -33,10 +34,10 @@ const model = computed({
<UpdateButton :pkg="pkg" />
<!-- @vue-expect-error Can't 'as any' because it breaks VSCode -->
<ToggleSwitch
v-if="pkg?.loc?.kind === 'Mod' || pkg?.loc?.kind === 'Unsupported'"
v-if="hasFeature(pkg, Feature.Mod)"
class="scale-[1.33] shrink-0"
inputId="switch"
:disabled="pkg!.loc!.kind === 'Unsupported'"
:disabled="pkg!.loc!.status === 'Unsupported'"
v-model="model"
/>
<InstallButton :pkg="pkg" />