forked from akanyan/STARTLINER
feat: less bad installations
This commit is contained in:
@ -13,7 +13,14 @@ const install = async () => {
|
||||
return;
|
||||
}
|
||||
|
||||
await invoke('install_package', { key: pkgKey(props.pkg) });
|
||||
try {
|
||||
await invoke('install_package', { key: pkgKey(props.pkg) });
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
if (props.pkg !== undefined) {
|
||||
props.pkg.js.busy = false;
|
||||
}
|
||||
}
|
||||
|
||||
//if (rv === 'Deferred') { /* download progress */ }
|
||||
};
|
||||
@ -39,7 +46,7 @@ const remove = async () => {
|
||||
size="small"
|
||||
class="self-center ml-4"
|
||||
style="width: 2rem; height: 2rem"
|
||||
:loading="false"
|
||||
:loading="pkg?.js.busy"
|
||||
v-on:click="remove()"
|
||||
/>
|
||||
|
||||
@ -52,7 +59,7 @@ const remove = async () => {
|
||||
size="small"
|
||||
class="self-center ml-4"
|
||||
style="width: 2rem; height: 2rem"
|
||||
:loading="false"
|
||||
:loading="pkg?.js.busy"
|
||||
v-on:click="install()"
|
||||
/>
|
||||
</template>
|
||||
|
@ -13,8 +13,9 @@ const props = defineProps({
|
||||
pkg: Object as () => Package,
|
||||
});
|
||||
|
||||
const toggle = (value: boolean) => {
|
||||
const toggle = async (value: boolean) => {
|
||||
store.toggle(props.pkg, value);
|
||||
await store.reloadProfile();
|
||||
};
|
||||
</script>
|
||||
|
||||
|
Reference in New Issue
Block a user