Fix: Todo Multi refresh ...

fix some promises problem
This commit is contained in:
Paolo Arena
2019-02-14 18:38:23 +01:00
parent e8d2d49829
commit 6931d57005
22 changed files with 281 additions and 163 deletions

View File

@@ -59,7 +59,8 @@ export default class Home extends Vue {
window.addEventListener('beforeinstallprompt', function (event) {
// console.log('******************************** beforeinstallprompt fired')
event.preventDefault()
console.log('§§§§§§§§§§§§§§§§§§§§ IMPOSTA DEFERRED PROMPT !!!!!!!!!!!!!!!!! ')
// console.log('§§§§§§§§§§§§§§§§§§§§ IMPOSTA DEFERRED PROMPT !!!!!!!!!!!!!!!!! ')
// #Todo++ IMPOSTA DEFERRED PROMPT
return false
})
@@ -69,6 +70,10 @@ export default class Home extends Vue {
return Notification.permission
}
NotServiceWorker () {
return (!('serviceWorker' in navigator))
}
displayConfirmNotification() {
let options = null
if ('serviceWorker' in navigator) {
@@ -88,10 +93,12 @@ export default class Home extends Vue {
]
}
navigator.serviceWorker.ready
.then(function (swreg) {
swreg.showNotification('Successfully subscribed!', options)
})
if ('serviceWorker' in navigator) {
navigator.serviceWorker.ready
.then(function (swreg) {
swreg.showNotification('Successfully subscribed!', options)
})
}
}
}
@@ -168,7 +175,6 @@ export default class Home extends Vue {
}
test_fetch() {
fetch('https:/httpbin.org/post', {
method: 'POST',