pwa upgrades

This commit is contained in:
osiu97
2026-07-08 19:07:06 +02:00
parent a321e8dd4c
commit b7effd52de
2 changed files with 39 additions and 0 deletions
+11
View File
@@ -191,6 +191,17 @@
});
}
// ── PWA Install Logic ──────────────────────────────────────────
window.deferredPrompt = null;
window.addEventListener('beforeinstallprompt', (e) => {
// Prevent automatic prompt
e.preventDefault();
window.deferredPrompt = e;
// Dispatch a custom event so sections can update their UI
window.dispatchEvent(new Event('pwa-installable'));
});
// ── Check Web Bluetooth availability ──────────────────────────
if (!navigator.bluetooth) {
setTimeout(() => {