Add fullscreen PWA support

This commit is contained in:
2026-05-30 00:32:57 -07:00
parent a6c2ec664b
commit 39014eee18
15 changed files with 114 additions and 8 deletions

9
web/src/pwa.ts Normal file
View File

@@ -0,0 +1,9 @@
export function registerServiceWorker() {
if (!import.meta.env.PROD || !("serviceWorker" in navigator)) return;
window.addEventListener("load", () => {
void navigator.serviceWorker.register("/sw.js").catch((error: unknown) => {
console.warn("Sybil service worker registration failed", error);
});
});
}