pwa upgrades
This commit is contained in:
+11
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user