fix: fix PWA

This commit is contained in:
2026-05-18 14:21:32 +02:00
parent c175da58dc
commit 4f53aefb6e
2 changed files with 13 additions and 0 deletions

View File

@ -123,6 +123,11 @@
if (evt.type === "containers.updated") load();
if (evt.type === "agent.connected" || evt.type === "agent.disconnected") load();
});
// Récupère le prompt capturé tôt dans app.html avant que onMount soit prêt
if ((window as any).__installPrompt) {
installPrompt = (window as any).__installPrompt;
(window as any).__installPrompt = null;
}
window.addEventListener("beforeinstallprompt", onBeforeInstallPrompt);
window.addEventListener("appinstalled", onAppInstalled);
});