mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-07-24 12:45:18 +02:00
Add:Device setting for locking screen orientation #449
This commit is contained in:
parent
af216d9b38
commit
9687f47b6b
12 changed files with 100 additions and 7 deletions
|
@ -156,6 +156,16 @@ Vue.prototype.$encode = encode
|
|||
const decode = (text) => Buffer.from(decodeURIComponent(text), 'base64').toString()
|
||||
Vue.prototype.$decode = decode
|
||||
|
||||
Vue.prototype.$setOrientationLock = (orientationLockSetting) => {
|
||||
if (orientationLockSetting == 'PORTRAIT') {
|
||||
window.screen.orientation.lock('portrait')
|
||||
} else if (orientationLockSetting == 'LANDSCAPE') {
|
||||
window.screen.orientation.lock('landscape')
|
||||
} else {
|
||||
window.screen.orientation.unlock()
|
||||
}
|
||||
}
|
||||
|
||||
export default ({ store, app }) => {
|
||||
// iOS Only
|
||||
// backButton event does not work with iOS swipe navigation so use this workaround
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue