[🐛] Fixed boot sequence

This commit is contained in:
ThinLiquid 2023-11-24 14:45:15 +00:00 committed by GitHub
parent 0bce7be1c6
commit 946cb23a03
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -53,9 +53,11 @@ window.wm = new WindowManager();
window.fs.exists('/.config/flow.json', (exists) => { window.fs.exists('/.config/flow.json', (exists) => {
if (!exists) { if (!exists) {
window.fs.promises.writeFile('/.config/flow.json', JSON.stringify(defaultConfig)).then(null).catch(e => console.error) window.fs.promises.writeFile('/.config/flow.json', JSON.stringify(defaultConfig)).then(null).catch(e => console.error)
window.location.reload()
} }
}) })
}) })
/** /**
* Gets the current FlowOS config. * Gets the current FlowOS config.
* *
@ -73,8 +75,6 @@ window.wm = new WindowManager();
}) })
} }
console.log(await window.config())
navigator.serviceWorker.register('/uv-sw.js?config=' + encodeURIComponent((await window.config()).SERVER_URL), { navigator.serviceWorker.register('/uv-sw.js?config=' + encodeURIComponent((await window.config()).SERVER_URL), {
scope: '/service/' scope: '/service/'
}).catch(e => console.error(e)) }).catch(e => console.error(e))