mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-07-18 09:45:11 +02:00
General cleanup, only disable auto-sleep temporarily
Auto sleep timer is only disabled until the end of the current time period (e.g. when the sleep timer would be disabled automatically).
This commit is contained in:
parent
161614f6c9
commit
13b020732f
3 changed files with 107 additions and 115 deletions
|
@ -86,6 +86,9 @@ export default {
|
|||
},
|
||||
timeRemainingPretty() {
|
||||
return this.$secondsToTimestamp(this.currentTime)
|
||||
},
|
||||
isIos() {
|
||||
return this.$platform === 'ios'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
@ -103,11 +106,19 @@ export default {
|
|||
},
|
||||
async cancelSleepTimer() {
|
||||
if (this.isAuto) {
|
||||
const { value } = await Dialog.confirm({
|
||||
title: 'Confirm',
|
||||
message: 'Are you sure you want to disable the auto sleep timer? You will need to enable this again in settings.'
|
||||
})
|
||||
if (!value) return
|
||||
if (this.$platform === 'ios') {
|
||||
const { value } = await Dialog.confirm({
|
||||
title: 'Confirm',
|
||||
message: this.$strings.MessageConfirmDisableAutoTimerIos
|
||||
})
|
||||
if (!value) return
|
||||
} else {
|
||||
const { value } = await Dialog.confirm({
|
||||
title: 'Confirm',
|
||||
message: this.$strings.MessageConfirmDisableAutoTimerAndroid
|
||||
})
|
||||
if (!value) return
|
||||
}
|
||||
}
|
||||
|
||||
await this.$hapticsImpact()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue