From 534ac4b720dff8a4368666e2ceab8f66326ea4f0 Mon Sep 17 00:00:00 2001 From: zsxeee Date: Fri, 17 Sep 2021 16:54:50 +0800 Subject: [PATCH] Move Apprise check to child component --- src/components/NotificationDialog.vue | 7 +------ src/components/notifications/Apprise.vue | 9 +++++++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/NotificationDialog.vue b/src/components/NotificationDialog.vue index c26990f8..f2549829 100644 --- a/src/components/NotificationDialog.vue +++ b/src/components/NotificationDialog.vue @@ -100,8 +100,7 @@ export default { type: null, isDefault: false, // Do not set default value here, please scroll to show() - }, - appriseInstalled: false, + } } }, @@ -131,10 +130,6 @@ export default { }, mounted() { this.modal = new Modal(this.$refs.modal) - - this.$root.getSocket().emit("checkApprise", (installed) => { - this.appriseInstalled = installed; - }) }, methods: { diff --git a/src/components/notifications/Apprise.vue b/src/components/notifications/Apprise.vue index b9d2a94b..000ce916 100644 --- a/src/components/notifications/Apprise.vue +++ b/src/components/notifications/Apprise.vue @@ -12,8 +12,7 @@

Status: - - Apprise is installed + Apprise is installed Apprise is not installed. Read more

@@ -24,7 +23,13 @@ export default { data() { return { name: "apprise", + appriseInstalled: false } }, + mounted() { + this.$root.getSocket().emit("checkApprise", (installed) => { + this.appriseInstalled = installed; + }) + }, }