Wire SW update prompt and request persistent storage (M6, web.dev)

This commit is contained in:
2026-06-07 20:39:07 +03:00
parent 5dc5ef8724
commit d94480f56d
4 changed files with 175 additions and 0 deletions
+6
View File
@@ -4,6 +4,7 @@ import { initPanes, wirePanes } from './app/orchestration/panes';
import { initPreviewFitMode, wirePreviewFitMode } from './app/orchestration/preferences';
import { initSettings, wireSettings } from './app/orchestration/settings';
import { initSnippetSort, wireSnippetSort } from './app/orchestration/snippet-sort';
import { initPersistentStorage, registerServiceWorker } from './app/orchestration/pwa';
import { initApp } from './app/orchestration/startup';
import { initTheme, wireTheme } from './app/orchestration/theme';
import '../styles/base.css';
@@ -37,4 +38,9 @@ wireSettings();
// hydration resolves.
void initApp();
// PWA: register the service worker (prompt the user to reload on an update) and
// request persistent storage so the local-first workspace isn't evicted (web.dev).
registerServiceWorker();
initPersistentStorage();
createRoot(document.getElementById('app')!).render(<App />);