✨ (notification) add vibration
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="dream-maker">
|
<div class="dream-maker">
|
||||||
<h2>Coder {{ position }}</h2>
|
<h2>code {{ position }}</h2>
|
||||||
<h4 v-show="isTurn">{{ session }}</h4>
|
<h4 v-show="isTurn">{{ session }}</h4>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -5,11 +5,10 @@ import { register } from 'register-service-worker'
|
|||||||
if (process.env.NODE_ENV === 'production') {
|
if (process.env.NODE_ENV === 'production') {
|
||||||
register(`${process.env.BASE_URL}service-worker.js`, {
|
register(`${process.env.BASE_URL}service-worker.js`, {
|
||||||
ready(sw) {
|
ready(sw) {
|
||||||
console.log(
|
console.log('App is being served from cache by a service worker')
|
||||||
'App is being served from cache by a service worker.\n' +
|
sw.showNotification('Session started!', {
|
||||||
'For more details, visit https://goo.gl/AFskqB'
|
vibrate: [300, 100, 400]
|
||||||
)
|
})
|
||||||
sw.showNotification('Coucou')
|
|
||||||
},
|
},
|
||||||
registered() {
|
registered() {
|
||||||
console.log('Service worker has been registered.')
|
console.log('Service worker has been registered.')
|
||||||
|
|||||||
Reference in New Issue
Block a user