(notification) add vibration

This commit is contained in:
2020-07-02 08:53:31 +02:00
parent f0a9fdd38a
commit 155f67c7e5
2 changed files with 5 additions and 6 deletions

View File

@@ -5,11 +5,10 @@ import { register } from 'register-service-worker'
if (process.env.NODE_ENV === 'production') {
register(`${process.env.BASE_URL}service-worker.js`, {
ready(sw) {
console.log(
'App is being served from cache by a service worker.\n' +
'For more details, visit https://goo.gl/AFskqB'
)
sw.showNotification('Coucou')
console.log('App is being served from cache by a service worker')
sw.showNotification('Session started!', {
vibrate: [300, 100, 400]
})
},
registered() {
console.log('Service worker has been registered.')