2020-11-28 01:12:47 +01:00
|
|
|
<template>
|
|
|
|
<div />
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import Utils from "@/Utils";
|
|
|
|
|
|
|
|
export default {
|
|
|
|
mixins: [Utils],
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
onMessage(event) {
|
2024-01-10 00:41:51 +01:00
|
|
|
this.notify({
|
|
|
|
title: event.title,
|
|
|
|
text: event.body,
|
|
|
|
image: {
|
|
|
|
src: event.icon ? 'data:image/png;base64, ' + event.icon : undefined,
|
|
|
|
icon: event.icon ? undefined : 'bell',
|
|
|
|
},
|
|
|
|
})
|
2020-11-28 01:12:47 +01:00
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
mounted() {
|
2024-01-10 00:41:51 +01:00
|
|
|
this.subscribe(
|
|
|
|
this.onMessage,
|
|
|
|
null,
|
|
|
|
'platypush.message.event.pushbullet.PushbulletNotificationEvent'
|
|
|
|
)
|
2020-11-28 01:12:47 +01:00
|
|
|
},
|
|
|
|
}
|
|
|
|
</script>
|