client: don't request storage access at all, it's not needed for toplevel site
This commit is contained in:
parent
89b68c8009
commit
2a4412e726
1 changed files with 8 additions and 24 deletions
|
|
@ -9,33 +9,17 @@ import * as backup from './backup.mjs'
|
|||
|
||||
uiLoading(locales('loading_server'))
|
||||
|
||||
function init() {
|
||||
|
||||
ipc.init(()=>{
|
||||
ipc.init(()=>{
|
||||
|
||||
|
||||
document.title = TITLE
|
||||
document.title = TITLE
|
||||
|
||||
ipc.send('open', {hotReload: backup.exists})
|
||||
ipc.send('open', {hotReload: backup.exists})
|
||||
|
||||
window.onunload = ()=>{
|
||||
ipc.send('close')
|
||||
}
|
||||
window.onunload = ()=>{
|
||||
ipc.send('close')
|
||||
}
|
||||
|
||||
backup.load()
|
||||
backup.load()
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
if (document.requestStorageAccess) {
|
||||
document.requestStorageAccess().then(init, (e)=>{
|
||||
init()
|
||||
setTimeout(()=>{
|
||||
console.error('Could not obtain storage access, the app might not work correctly unless the browser\'s settings are updated')
|
||||
console.error(e)
|
||||
}, 1000)
|
||||
})
|
||||
} else {
|
||||
init()
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue