fix: fix PWA
This commit is contained in:
@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user