backups: show error if label is malformed
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user