mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-12-23 22:48:20 -05:00
fix: add loader for create backup button (#6763)
This commit is contained in:
@@ -81,6 +81,7 @@
|
|||||||
>
|
>
|
||||||
<BaseButton
|
<BaseButton
|
||||||
class="mr-2"
|
class="mr-2"
|
||||||
|
:loading="runningBackup"
|
||||||
@click="createBackup"
|
@click="createBackup"
|
||||||
>
|
>
|
||||||
{{ $t("settings.backup.create-heading") }}
|
{{ $t("settings.backup.create-heading") }}
|
||||||
@@ -182,6 +183,7 @@ export default defineNuxtComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function createBackup() {
|
async function createBackup() {
|
||||||
|
state.runningBackup = true;
|
||||||
const { data } = await adminApi.backups.create();
|
const { data } = await adminApi.backups.create();
|
||||||
|
|
||||||
if (data?.error === false) {
|
if (data?.error === false) {
|
||||||
@@ -191,6 +193,7 @@ export default defineNuxtComponent({
|
|||||||
else {
|
else {
|
||||||
alert.error(i18n.t("settings.backup.error-creating-backup-see-log-file"));
|
alert.error(i18n.t("settings.backup.error-creating-backup-see-log-file"));
|
||||||
}
|
}
|
||||||
|
state.runningBackup = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function restoreBackup(fileName: string) {
|
async function restoreBackup(fileName: string) {
|
||||||
@@ -227,6 +230,7 @@ export default defineNuxtComponent({
|
|||||||
deleteDialog: false,
|
deleteDialog: false,
|
||||||
createDialog: false,
|
createDialog: false,
|
||||||
importDialog: false,
|
importDialog: false,
|
||||||
|
runningBackup: false,
|
||||||
runningRestore: false,
|
runningRestore: false,
|
||||||
search: "",
|
search: "",
|
||||||
headers: [
|
headers: [
|
||||||
|
|||||||
Reference in New Issue
Block a user