forked from akanyan/STARTLINER
fix: remove update check from the ui
it is no longer necessary
This commit is contained in:
@ -40,30 +40,20 @@ const pkgSearchTerm = ref('');
|
||||
|
||||
const isProfileDisabled = computed(() => prf.current === null);
|
||||
|
||||
const updateVisible = ref(false);
|
||||
const updateProgress = ref(-1);
|
||||
|
||||
const hasUpdatedCheck = async () => {
|
||||
const res = await invoke('has_updated');
|
||||
if (res == false) {
|
||||
updateVisible.value = true;
|
||||
setTimeout(hasUpdatedCheck, 200);
|
||||
} else {
|
||||
updateVisible.value = false;
|
||||
}
|
||||
};
|
||||
const updateProgress: Ref<number | null> = ref(null);
|
||||
|
||||
listen<number>('update-progress', (ev) => {
|
||||
updateProgress.value = ev.payload;
|
||||
});
|
||||
|
||||
listen<undefined>('update-end', (_) => {
|
||||
updateProgress.value = null;
|
||||
});
|
||||
|
||||
onMounted(async () => {
|
||||
invoke('list_directories').then((d) => {
|
||||
general.dirs = d as Dirs;
|
||||
client.load();
|
||||
if (client.enableAutoupdates) {
|
||||
hasUpdatedCheck();
|
||||
}
|
||||
});
|
||||
|
||||
const fetch_promise = pkg.fetch(true);
|
||||
@ -157,14 +147,12 @@ listen<{ message: string; header: string }>('invoke-error', (event) => {
|
||||
</Dialog>
|
||||
<Dialog
|
||||
modal
|
||||
:visible="updateVisible"
|
||||
:visible="updateProgress !== null"
|
||||
:closable="false"
|
||||
:header="updateProgress < 0 ? 'Checking for updates' : 'Updating'"
|
||||
:style="{ width: '50vw' }"
|
||||
header="Updating"
|
||||
:style="{ width: '200px' }"
|
||||
>
|
||||
<div v-if="updateProgress >= 0">
|
||||
{{ (updateProgress * 100).toFixed(0) }}%
|
||||
</div>
|
||||
{{ ((updateProgress ?? 0) * 100).toFixed(0) }}%
|
||||
</Dialog>
|
||||
|
||||
<Tabs
|
||||
|
Reference in New Issue
Block a user