modifiche face offline e 2 secondi di attesa

This commit is contained in:
David Frassi
2026-07-13 17:55:07 +02:00
parent 333858bf48
commit 9f9b164937
20 changed files with 936 additions and 128 deletions
+13
View File
@@ -172,6 +172,13 @@ export class AppComponent implements OnInit {
});
}
if (window.location.hostname === 'localhost' || window.location.hostname === '127.0.0.1') {
console.log('[AppComponent] Running on localhost - skipping protocol link redirect on appinstalled.');
this.isRedirecting.set(false);
this.checkLoaderDismissal();
return;
}
setTimeout(() => {
window.location.href = this.protocolLink;
}, 1000);
@@ -377,6 +384,12 @@ export class AppComponent implements OnInit {
}
async checkAndRedirectToPwa() {
if (window.location.hostname === 'localhost' || window.location.hostname === '127.0.0.1') {
console.log('[AppComponent] Running on localhost - skipping PWA redirect and install overlays.');
this.checkLoaderDismissal();
return;
}
const isStandalone = window.matchMedia('(display-mode: standalone)').matches || (navigator as any).standalone;
if (isStandalone) {
localStorage.setItem('pwa-installed', 'true');