feat(webui): add PWA support for mobile home screen installation

- Add manifest.json with icons for install prompt
- Add service worker with cache-first for static assets
- Register SW in main.tsx
- Link manifest in index.html
This commit is contained in:
zpljd258
2026-08-11 20:59:06 +08:00
committed by chengyongru
parent 7703cd22eb
commit 43ca12960b
7 changed files with 114 additions and 0 deletions
+8
View File
@@ -28,3 +28,11 @@ initializeLoopbackRuntimeHost();
/* StrictMode disabled: dev double-invokes state updaters; delta accumulation must stay pure — see useNanobotStream. */
ReactDOM.createRoot(root).render(<App />);
if ("serviceWorker" in navigator) {
window.addEventListener("load", () => {
navigator.serviceWorker.register("/sw.js", {
updateViaCache: "none",
});
});
}