push subscriptions managment

This commit is contained in:
Dobromir Popov
2024-05-07 11:59:41 +03:00
parent a8a50c76a8
commit d95898005c
3 changed files with 67 additions and 30 deletions

View File

@ -31,7 +31,7 @@ self.addEventListener('push', function (event) {
registration.showNotification(data.title, {
body: data.message,
icon: '/favicon.ico',
actions: [...data.actions, { action: 'close', title: 'Close', icon: 'fa fa-times' }],
actions: [{ action: 'close', title: 'Close', icon: 'fa fa-times' }],
data: data.url,
})
)