aggiornamento

This commit is contained in:
Surya Paolo
2024-05-27 21:05:36 +02:00
parent 6459aaa4c4
commit fdf2412208
30 changed files with 381 additions and 431 deletions

View File

@@ -13,10 +13,6 @@ register(process.env.SERVICE_WORKER_FILE ? process.env.SERVICE_WORKER_FILE : '',
registered(registration) { // registration -> a ServiceWorkerRegistration instance
console.log('REGISTERED::: !!!', process.env.SERVICE_WORKER_FILE)
setInterval(() => {
registration.update()
}, 5000) // every 5 seconds
},
cached(registration) {
console.log('CACHED::: Content has been cached for offline use.')
@@ -30,7 +26,6 @@ register(process.env.SERVICE_WORKER_FILE ? process.env.SERVICE_WORKER_FILE : '',
new CustomEvent('swUpdated', { detail: registration })
)
console.log('New content is available; please refresh.')
// window.location.reload();
},
offline() {
console.log('No internet connection found. App is running in offline mode.')
@@ -40,6 +35,4 @@ register(process.env.SERVICE_WORKER_FILE ? process.env.SERVICE_WORKER_FILE : '',
},
});
// ServiceWorkerRegistration: https://developer.mozilla.org/enUs/docs/Web/API/ServiceWorkerRegistration
// "build": "quasar build -m pwa && workbox generateSW workbox-config.js",
// ServiceWorkerRegistration: https://developer.mozilla.org/enUs/docs/Web/API/ServiceWorkerRegistration