mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-12-17 19:54:39 -05:00
Move Apprise check to child component
This commit is contained in:
parent
e9735d239b
commit
534ac4b720
@ -100,8 +100,7 @@ export default {
|
|||||||
type: null,
|
type: null,
|
||||||
isDefault: false,
|
isDefault: false,
|
||||||
// Do not set default value here, please scroll to show()
|
// Do not set default value here, please scroll to show()
|
||||||
},
|
}
|
||||||
appriseInstalled: false,
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -131,10 +130,6 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.modal = new Modal(this.$refs.modal)
|
this.modal = new Modal(this.$refs.modal)
|
||||||
|
|
||||||
this.$root.getSocket().emit("checkApprise", (installed) => {
|
|
||||||
this.appriseInstalled = installed;
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
|
@ -12,8 +12,7 @@
|
|||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<p>
|
<p>
|
||||||
Status:
|
Status:
|
||||||
<!-- TODO: appriseInstalled -->
|
<span v-if="appriseInstalled" class="text-primary">Apprise is installed</span>
|
||||||
<span v-if="$parent.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>
|
<span v-else class="text-danger">Apprise is not installed. <a href="https://github.com/caronc/apprise" target="_blank">Read more</a></span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -24,7 +23,13 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
name: "apprise",
|
name: "apprise",
|
||||||
|
appriseInstalled: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
this.$root.getSocket().emit("checkApprise", (installed) => {
|
||||||
|
this.appriseInstalled = installed;
|
||||||
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user