- se iOS non ricarica la pagina ma disinstalla il SW precedente e chiede di riavviare

- fixed: Creando un Conto di Gruppo, pare che venga impostato anche l'username... invece dev'essere solo il groupname
-
This commit is contained in:
Surya Paolo
2023-10-03 23:17:02 +02:00
parent c02037b35c
commit 018cf0bd99
11 changed files with 72 additions and 30 deletions

View File

@@ -26,6 +26,8 @@ import { CMyCart, CSigninNoreg } from '@/components'
import { costanti } from '@costanti'
import { useNotifStore } from '@src/store/NotifStore'
import { Platform } from 'quasar';
export default defineComponent({
name: 'MyHeader',
components: {
@@ -365,20 +367,24 @@ export default defineComponent({
*/
function RefreshApp() {
// Unregister Service Worker
/*
navigator.serviceWorker.getRegistrations().then((registrations) => {
// Unregister Service Worker
navigator.serviceWorker.getRegistrations().then((registrations) => {
for (const registration of registrations) {
registration.unregister()
}
})
window.location.reload() */
data.value.updateExists = false
// Make sure we only send a 'skip waiting' message if the SW is waiting
if (!data.value.registration || !data.value.registration.waiting) return
// Send message to SW to skip the waiting and activate the new SW
data.value.registration.waiting.postMessage({ type: 'SKIP_WAITING' })
if (Platform.is.ios) {
// window.location.reload()
} else {
data.value.updateExists = false
// Make sure we only send a 'skip waiting' message if the SW is waiting
if (!data.value.registration || !data.value.registration.waiting) return
// Send message to SW to skip the waiting and activate the new SW
data.value.registration.waiting.postMessage({ type: 'SKIP_WAITING' })
}
}
function changeIconConn() {