diff --git a/pages/settings.vue b/pages/settings.vue index 978daa60..edc69f0a 100644 --- a/pages/settings.vue +++ b/pages/settings.vue @@ -354,11 +354,11 @@ export default { isiOS() { return this.$platform === 'ios' }, - jumpForwardItems() { - return this.$store.state.globals.jumpForwardItems || [] + jumpForwardSecondsOptions() { + return this.$store.state.globals.jumpForwardSecondsOptions || [] }, - jumpBackwardsItems() { - return this.$store.state.globals.jumpBackwardsItems || [] + jumpBackwardsSecondsOptions() { + return this.$store.state.globals.jumpBackwardsSecondsOptions || [] }, languageOptionItems() { return this.$languageCodeOptions || [] @@ -385,26 +385,6 @@ export default { } ] }, - currentJumpForwardTimeIcon() { - return this.currentJumpForwardItem.icon - }, - currentJumpForwardTimeIndex() { - var index = this.jumpForwardItems.findIndex((jfi) => jfi.value === this.settings.jumpForwardTime) - return index >= 0 ? index : 1 - }, - currentJumpForwardItem() { - return this.jumpForwardItems[this.currentJumpForwardTimeIndex] || this.jumpForwardItems[0] || {} - }, - currentJumpBackwardsTimeIcon() { - return this.currentJumpBackwardsItem.icon - }, - currentJumpBackwardsTimeIndex() { - var index = this.jumpBackwardsItems.findIndex((jfi) => jfi.value === this.settings.jumpBackwardsTime) - return index >= 0 ? index : 1 - }, - currentJumpBackwardsItem() { - return this.jumpBackwardsItems[this.currentJumpBackwardsTimeIndex] || this.jumpBackwardsItems[0] || {} - }, shakeSensitivityOption() { const item = this.shakeSensitivityItems.find((i) => i.value === this.settings.shakeSensitivity) return item?.text || 'Error' @@ -449,16 +429,14 @@ export default { else if (this.moreMenuSetting === 'streamingUsingCellular') return this.streamingUsingCellularItems else if (this.moreMenuSetting === 'androidAutoBrowseSeriesSequenceOrder') return this.androidAutoBrowseSeriesSequenceOrderItems else if (this.moreMenuSetting === 'jumpForward') - return this.jumpForwardItems.map((i) => ({ - text: this.getJumpLabel(i.value), - value: i.value, - icon: i.icon + return this.jumpForwardSecondsOptions.map((value) => ({ + text: this.getJumpLabel(value), + value: value })) else if (this.moreMenuSetting === 'jumpBackwards') - return this.jumpBackwardsItems.map((i) => ({ - text: this.getJumpLabel(i.value), - value: i.value, - icon: i.icon + return this.jumpBackwardsSecondsOptions.map((value) => ({ + text: this.getJumpLabel(value), + value: value })) return [] }, diff --git a/store/globals.js b/store/globals.js index c4db7705..7e80824b 100644 --- a/store/globals.js +++ b/store/globals.js @@ -5,66 +5,8 @@ export const state = () => ({ series: null, localMediaProgress: [], lastSearch: null, - jumpForwardItems: [ - { - icon: 'forward_media', - value: 5 - }, - { - icon: 'forward_media', - value: 10 - }, - { - icon: 'forward_media', - value: 15 - }, - { - icon: 'forward_media', - value: 30 - }, - { - icon: 'forward_media', - value: 60 - }, - { - icon: 'forward_media', - value: 120 - }, - { - icon: 'forward_media', - value: 300 - } - ], - jumpBackwardsItems: [ - { - icon: 'replay', - value: 5 - }, - { - icon: 'replay', - value: 10 - }, - { - icon: 'replay', - value: 15 - }, - { - icon: 'replay', - value: 30 - }, - { - icon: 'replay', - value: 60 - }, - { - icon: 'replay', - value: 120 - }, - { - icon: 'replay', - value: 300 - } - ], + jumpForwardSecondsOptions: [5, 10, 15, 30, 60, 120, 300], + jumpBackwardsSecondsOptions: [5, 10, 15, 30, 60, 120, 300], libraryIcons: ['database', 'audiobookshelf', 'books-1', 'books-2', 'book-1', 'microphone-1', 'microphone-3', 'radio', 'podcast', 'rss', 'headphones', 'music', 'file-picture', 'rocket', 'power', 'star', 'heart'], selectedPlaylistItems: [], showPlaylistsAddCreateModal: false,