feat: groundwork for multi-profile support
This commit is contained in:
@ -5,17 +5,17 @@ import { open } from '@tauri-apps/plugin-shell';
|
||||
import InstallButton from './InstallButton.vue';
|
||||
import ModTitlecard from './ModTitlecard.vue';
|
||||
import UpdateButton from './UpdateButton.vue';
|
||||
import { usePkgStore } from '../stores';
|
||||
import { usePrfStore } from '../stores';
|
||||
import { Package } from '../types';
|
||||
|
||||
const store = usePkgStore();
|
||||
const prf = usePrfStore();
|
||||
|
||||
const props = defineProps({
|
||||
pkg: Object as () => Package,
|
||||
});
|
||||
|
||||
const toggle = async (value: boolean) => {
|
||||
await store.toggle(props.pkg, value);
|
||||
await prf.togglePkg(props.pkg, value);
|
||||
};
|
||||
</script>
|
||||
|
||||
@ -27,7 +27,7 @@ const toggle = async (value: boolean) => {
|
||||
class="scale-[1.33] shrink-0"
|
||||
inputId="switch"
|
||||
:disabled="!pkg?.loc"
|
||||
:modelValue="store.isEnabled(pkg)"
|
||||
:modelValue="prf.isPkgEnabled(pkg)"
|
||||
v-on:value-change="toggle"
|
||||
/>
|
||||
<InstallButton :pkg="pkg" />
|
||||
|
Reference in New Issue
Block a user