From ea31d3e69a38dfacd655c3ce7fb0b1e605ebb453 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 21 Dec 2025 20:06:05 -0500 Subject: [PATCH] update frontend --- public/pwaInstall.js | 9 ++++----- public/vite.svg | 1 - 2 files changed, 4 insertions(+), 6 deletions(-) delete mode 100644 public/vite.svg diff --git a/public/pwaInstall.js b/public/pwaInstall.js index 9acba9b..37d83fb 100644 --- a/public/pwaInstall.js +++ b/public/pwaInstall.js @@ -1,12 +1,11 @@ // src/pwaInstall.js let deferredPrompt = null; -// Stocke l'événement natif quand Chrome le déclenche +// Stocke l'événement natif quand Chrome le déclenche (après interactions) window.addEventListener('beforeinstallprompt', (e) => { - // Empêche le prompt auto (on veut le contrôler) e.preventDefault(); deferredPrompt = e; - console.log('PWA: Install prompt ready - ready to trigger on button click'); + console.log('PWA: Install prompt ready - waiting for user click on button'); }); // Fonction appelée par le bouton "Install" @@ -19,7 +18,7 @@ export function promptInstall() { deferredPrompt = null; }); } else { - console.log('PWA: No prompt ready yet - wait for beforeinstallprompt event'); - alert('PWA not ready yet. Try scrolling or interacting more with the site.'); + console.log('PWA: No prompt ready yet - interact with the site (scroll, click)'); + alert('PWA not ready yet. Try scrolling, clicking filters or markers, then click Install again.'); } } \ No newline at end of file diff --git a/public/vite.svg b/public/vite.svg deleted file mode 100644 index e7b8dfb..0000000 --- a/public/vite.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file