push notification implemented
need testing
This commit is contained in:
1 parent
26a17b5a4c
commit
0bbf2ab56f
19 files changed
+907
-84
No files matched your search
+3
-2
@@ -32,9 +32,10 @@ self.addEventListener('push', (event: PushEvent) => {
|
||||
const title = data.title ?? 'Placebo.mk'
|
||||
const options = {
|
||||
body: data.body ?? 'New update available',
|
||||
icon: '/icons/icon-192.png',
|
||||
badge: '/icons/badge-72.png',
|
||||
icon: data.icon ?? '/icons/icon-192.svg',
|
||||
badge: data.badge ?? '/icons/badge-72.svg',
|
||||
data: data.url ?? '/',
|
||||
tag: data.tag,
|
||||
}
|
||||
|
||||
event.waitUntil(self.registration.showNotification(title, options))
|
||||
|
||||
Reference in new issue
Block a user