platypush/platypush/backend/http/webapp/src/components/Ntfy.vue

29 lines
435 B
Vue

<template>
<div />
</template>
<script>
import Utils from "@/Utils";
export default {
name: "Ntfy",
mixins: [Utils],
methods: {
onMessage(event) {
this.notify({
title: event.title,
text: event.message,
image: {
icon: 'bell',
},
})
},
},
mounted() {
this.subscribe(this.onMessage, null, 'platypush.message.event.ntfy.NotificationEvent')
},
}
</script>