Tauri detection (future)

This commit is contained in:
Zef Hemel
2026-03-15 08:02:51 +01:00
parent 356bc82986
commit efe70a77dd
+7 -1
View File
@@ -148,7 +148,13 @@ safeRun(async () => {
console.log("Booting SilverBullet client");
console.log("Boot config", bootConfig, config.values);
if (localStorage.getItem("enableSW") !== "0" && navigator.serviceWorker) {
// If Tauri: then no SW
const isTauri = !!(window as any).__TAURI__;
if (
!isTauri &&
localStorage.getItem("enableSW") !== "0" &&
navigator.serviceWorker
) {
// Register service worker
const workerURL = new URL("service_worker.js", document.baseURI);
let startNotificationCount = 0;