Display any update check error

This commit is contained in:
Girish Ramakrishnan
2025-09-10 18:54:04 +02:00
parent 4c278a8da5
commit c845b63578
+9 -1
View File
@@ -60,6 +60,7 @@ const currentPattern = ref('');
const updateBusy = ref(false);
const updateError = ref({});
const stopError = ref({});
const updateCheckError = ref({});
const checkingBusy = ref(false);
const pendingUpdate = ref(null);
const skipBackup = ref(false);
@@ -108,6 +109,7 @@ async function refreshInfo() {
updateError.value = {};
stopError.value = {};
updateCheckError.value = {};
pendingUpdate.value = result || null;
}
@@ -218,9 +220,14 @@ async function onSubmitUpdate() {
async function onCheck() {
checkingBusy.value = true;
updateCheckError.value = {};
const [error] = await updaterModel.checkBoxUpdate();
if (error) return console.error(error);
if (error) {
updateCheckError.value.generic = error.body?.message || 'Internal error';
checkingBusy.value = false;
return;
}
await refreshInfo();
checkingBusy.value = false;
@@ -336,6 +343,7 @@ onMounted(async () => {
<p v-if="updateBusy && lastTask">{{ lastTask.message }}</p>
<div class="error-label" v-if="stopError.generic">{{ stopError.generic }}</div>
<div class="error-label" v-if="updateCheckError.generic">{{ updateCheckError.generic }}</div>
<div class="button-bar">
<Button danger v-if="updateBusy" @click="onStop()">{{ $t('settings.updates.stopUpdateAction') }}</Button>