import { createApp } from "vue"; import { createPinia } from "pinia"; import App from "./App.vue"; import router from "./router"; import { isDesktop, logEvent } from "./desktop/bridge"; import "./style.css"; const app = createApp(App); app.use(createPinia()); // before router: the nav guard reads the session store app.use(router); app.mount("#app"); // Boot line (desktop only): which data source, and the WebKit user-agent — the // renderer identity that matters most when a build behaves differently per machine. logEvent("info", `boot: source=${isDesktop() ? "local (offline core)" : "rest"} ua=${navigator.userAgent}`); // Register the service worker so the app is installable (PWA). It's a // progressive enhancement — installability only, not offline-first (see // public/sw.js) — so failures are non-fatal and intentionally ignored. if ("serviceWorker" in navigator) { window.addEventListener("load", () => { void navigator.serviceWorker.register("/sw.js").catch(() => {}); }); }