mirror of
https://github.com/Sebclem/hassio-nextcloud-backup.git
synced 2024-12-24 15:06:43 +01:00
[Front] Refresh cloud list on setting change
This commit is contained in:
parent
073cf968a5
commit
363768f4ba
@ -2,7 +2,7 @@
|
||||
<v-app>
|
||||
<navbar-component></navbar-component>
|
||||
<message-bar></message-bar>
|
||||
<webdav-settings-menu></webdav-settings-menu>
|
||||
<webdav-config-menu @saved="cloudList?.refreshBackup"></webdav-config-menu>
|
||||
<backup-config-menu></backup-config-menu>
|
||||
<alert-manager></alert-manager>
|
||||
<v-main class="mx-12">
|
||||
@ -11,7 +11,7 @@
|
||||
<ha-list></ha-list>
|
||||
</v-col>
|
||||
<v-col cols="6">
|
||||
<cloud-list></cloud-list>
|
||||
<cloud-list ref="cloudList"></cloud-list>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-main>
|
||||
@ -19,13 +19,16 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from "vue";
|
||||
import AlertManager from "./components/AlertManager.vue";
|
||||
import CloudList from "./components/cloud/CloudList.vue";
|
||||
import HaList from "./components/homeAssistant/HaList.vue";
|
||||
import MessageBar from "./components/MessageBar.vue";
|
||||
import NavbarComponent from "./components/NavbarComponent.vue";
|
||||
import BackupConfigMenu from "./components/settings/BackupConfigMenu.vue";
|
||||
import WebdavSettingsMenu from "./components/settings/WebdavConfigMenu.vue";
|
||||
import WebdavConfigMenu from "./components/settings/WebdavConfigMenu.vue";
|
||||
import StatusComponent from "./components/StatusComponent.vue";
|
||||
const cloudList = ref<InstanceType<typeof CloudList> | null>(null);
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
@ -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<br>Please check credentials !"
|
||||
);
|
||||
}
|
||||
|
||||
function saved() {
|
||||
dialogStatusStore.webdav = false;
|
||||
saving.value = false;
|
||||
alertStore.add("success", "Cloud settings saved !");
|
||||
emit("saved");
|
||||
}
|
||||
</script>
|
||||
@/store/alert@/store/dialogStatus
|
Loading…
Reference in New Issue
Block a user