mirror of
https://github.com/olehomelchenko/astrolabe.git
synced 2026-08-08 02:02:33 +00:00
Wire SW update prompt and request persistent storage (M6, web.dev)
This commit is contained in:
@@ -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 />);
|
||||
|
||||
Reference in New Issue
Block a user