add install/uninstall options in the setup menu
This commit is contained in:
parent
ed11fbd82a
commit
783f39bb4e
8 changed files with 41 additions and 10 deletions
|
|
@ -1,11 +1,10 @@
|
|||
// --- configurable ---
|
||||
const CACHE_VERSION = 'boot-001';
|
||||
const BUNDLE_URL = '/boot/bundle.bin';
|
||||
const VERSION_KEY = '/__version__';
|
||||
|
||||
let loaded = 0;
|
||||
let mode = 'cached';
|
||||
let currentVersion = null;
|
||||
let BUNDLE_URL = '/boot/bundle.bin';
|
||||
|
||||
// --- logging ---
|
||||
const log = (...a) => console.log('[SW]', ...a);
|
||||
|
|
@ -30,6 +29,7 @@ self.addEventListener('message', e => {
|
|||
unregister();
|
||||
} else if (version !== undefined) {
|
||||
mode = 'cached';
|
||||
BUNDLE_URL = `/boot/bundle-${version}.bin`;
|
||||
log('version', version);
|
||||
ensureVersion(version);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue