backups: show error if label is malformed

This commit is contained in:
Girish Ramakrishnan
2026-01-14 09:36:04 +01:00
parent 9647fb358b
commit f49f2ecb6c
@@ -211,11 +211,12 @@ async function onEditSubmit() {
const [error] = await backupsModel.update(editBackupId.value, editBackupLabel.value, editBackupPersist.value ? -1 : 0);
if (error) {
return console.error(error);
editBackupBusy.value = false;
editBackupError.value = error.body?.message || JSON.stringify(error);
return;
}
await refreshBackups();
editBackupBusy.value = false;
editDialog.value.close();
}
@@ -251,7 +252,7 @@ defineExpose({ refresh });
:confirm-busy="editBackupBusy"
@confirm="onEditSubmit()"
>
<p class="has-error text-center" v-show="editBackupError">{{ editBackupError }}</p>
<div class="has-error text-center" v-show="editBackupError">{{ editBackupError }}</div>
<form @submit.prevent="onEditSubmit()" autocomplete="off">
<fieldset>