From b87feaa8d9ca0938b263e3a6615aeda4775bb2a2 Mon Sep 17 00:00:00 2001 From: SebClem Date: Thu, 18 Apr 2024 10:50:03 +0200 Subject: [PATCH] [Front] Refresh cloud list on setting change --- nextcloud_backup/frontend/src/App.vue | 9 ++++++--- .../src/components/settings/WebdavConfigMenu.vue | 11 +++++++++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/nextcloud_backup/frontend/src/App.vue b/nextcloud_backup/frontend/src/App.vue index e8450f0..50cc6f7 100644 --- a/nextcloud_backup/frontend/src/App.vue +++ b/nextcloud_backup/frontend/src/App.vue @@ -2,7 +2,7 @@ - + @@ -11,7 +11,7 @@ - + @@ -19,13 +19,16 @@ diff --git a/nextcloud_backup/frontend/src/components/settings/WebdavConfigMenu.vue b/nextcloud_backup/frontend/src/components/settings/WebdavConfigMenu.vue index a329f14..84369b2 100644 --- a/nextcloud_backup/frontend/src/components/settings/WebdavConfigMenu.vue +++ b/nextcloud_backup/frontend/src/components/settings/WebdavConfigMenu.vue @@ -53,6 +53,10 @@ let saveLoading = computed(() => { return saving.value || loading.value; }); +const emit = defineEmits<{ + (e: "saved"): void; +}>(); + function save() { saving.value = true; form.value?.save(); @@ -60,13 +64,16 @@ function save() { function fail() { saving.value = false; - alertStore.add("error", "Fail to save cloud settings !"); + alertStore.add( + "error", + "Fail to connect to Cloud
Please check credentials !" + ); } function saved() { dialogStatusStore.webdav = false; saving.value = false; alertStore.add("success", "Cloud settings saved !"); + emit("saved"); } -@/store/alert@/store/dialogStatus \ No newline at end of file