Browse Source
Move Apprise check to child component
pull/427/head
zsxeee
4 years ago
No known key found for this signature in database
GPG Key ID: 895CFFFD8313B3B8
2 changed files with
8 additions and
8 deletions
-
src/components/NotificationDialog.vue
-
src/components/notifications/Apprise.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: { |
|
|
|
|
|
|
|
|
|
@ -12,8 +12,7 @@ |
|
|
|
<div class="mb-3"> |
|
|
|
<p> |
|
|
|
Status: |
|
|
|
<!-- TODO: appriseInstalled --> |
|
|
|
<span v-if="$parent.appriseInstalled" class="text-primary">Apprise is installed</span> |
|
|
|
<span v-if="appriseInstalled" class="text-primary">Apprise is installed</span> |
|
|
|
<span v-else class="text-danger">Apprise is not installed. <a href="https://github.com/caronc/apprise" target="_blank">Read more</a></span> |
|
|
|
</p> |
|
|
|
</div> |
|
|
@ -24,7 +23,13 @@ export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
name: "apprise", |
|
|
|
appriseInstalled: false |
|
|
|
} |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
this.$root.getSocket().emit("checkApprise", (installed) => { |
|
|
|
this.appriseInstalled = installed; |
|
|
|
}) |
|
|
|
}, |
|
|
|
} |
|
|
|
</script> |
|
|
|