feat: ui scaling, update all

This commit is contained in:
2025-04-04 14:37:16 +00:00
parent 536f289cfe
commit 8c3f9762a4
15 changed files with 429 additions and 176 deletions

View File

@ -1,33 +1,16 @@
<script setup lang="ts">
import Button from 'primevue/button';
import { invoke } from '../invoke';
import { usePkgStore } from '../stores';
import { Package } from '../types';
import { pkgKey } from '../util';
const pkgs = usePkgStore();
const props = defineProps({
pkg: Object as () => Package,
});
const install = async () => {
if (props.pkg === undefined) {
return;
}
try {
await invoke('install_package', {
key: pkgKey(props.pkg),
force: true,
});
} catch (err) {
console.error(err);
if (props.pkg !== undefined) {
props.pkg.js.busy = false;
}
}
//if (rv === 'Deferred') { /* download progress */ }
};
const remove = async () => {
if (props.pkg === undefined) {
return;
@ -41,7 +24,7 @@ const remove = async () => {
<template>
<Button
v-if="pkg?.loc"
v-if="pkg?.loc && !pkg?.js.busy"
rounded
icon="pi pi-trash"
severity="danger"
@ -63,6 +46,6 @@ const remove = async () => {
class="self-center ml-4"
style="width: 2rem; height: 2rem"
:loading="pkg?.js.busy"
v-on:click="install()"
v-on:click="async () => await pkgs.install(pkg)"
/>
</template>