uptime-kuma/src/components/notifications/Apprise.vue

39 lines
1.4 KiB
Vue
Raw Normal View History

<template>
<div class="mb-3">
2021-09-21 01:02:41 -04:00
<label for="apprise-url" class="form-label">{{ $t("Apprise URL") }}</label>
<input id="apprise-url" v-model="$parent.notification.appriseURL" type="text" class="form-control" required>
<div class="form-text">
2021-09-21 01:02:41 -04:00
<p>{{ $t("Example:", ["twilio://AccountSid:AuthToken@FromPhoneNo"]) }}</p>
2021-09-30 07:22:17 -04:00
<i18n-t tag="p" keypath="Read more:">
2021-09-21 01:02:41 -04:00
<a href="https://github.com/caronc/apprise/wiki#notification-services" target="_blank">https://github.com/caronc/apprise/wiki#notification-services</a>
</i18n-t>
</div>
<label for="title" class="form-label">{{ $t("Title") }}</label>
<input id="title" v-model="$parent.notification.title" type="text" class="form-control">
</div>
<div class="mb-3">
2021-09-30 07:22:17 -04:00
<i18n-t tag="p" keypath="Status:">
2021-09-22 10:15:50 -04:00
<span v-if="appriseInstalled" class="text-primary">{{ $t("appriseInstalled") }}</span>
2021-09-30 07:22:17 -04:00
<i18n-t v-else tag="span" keypath="appriseNotInstalled" class="text-danger">
2021-09-22 10:15:50 -04:00
<a href="https://github.com/caronc/apprise" target="_blank">{{ $t("Read more") }}</a>
</i18n-t>
2021-09-21 01:02:41 -04:00
</i18n-t>
</div>
</template>
<script>
export default {
data() {
return {
2021-09-17 04:54:50 -04:00
appriseInstalled: false
2021-09-30 07:22:17 -04:00
};
},
2021-09-17 04:54:50 -04:00
mounted() {
this.$root.getSocket().emit("checkApprise", (installed) => {
this.appriseInstalled = installed;
2021-09-30 07:22:17 -04:00
});
2021-09-17 04:54:50 -04:00
},
2021-09-30 07:22:17 -04:00
};
</script>