Fix:iOS offline reading and initialization

This commit is contained in:
advplyr 2023-06-20 16:29:56 -05:00
parent 147f89f870
commit 48342e5bd3
6 changed files with 19 additions and 12 deletions

View file

@ -188,12 +188,14 @@ const decode = (text) => Buffer.from(decodeURIComponent(text), 'base64').toStrin
Vue.prototype.$decode = decode
Vue.prototype.$setOrientationLock = (orientationLockSetting) => {
if (!window.screen?.orientation) return
if (orientationLockSetting == 'PORTRAIT') {
window.screen.orientation.lock('portrait')
window.screen.orientation.lock?.('portrait')
} else if (orientationLockSetting == 'LANDSCAPE') {
window.screen.orientation.lock('landscape')
window.screen.orientation.lock?.('landscape')
} else {
window.screen.orientation.unlock()
window.screen.orientation.unlock?.()
}
}