mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-08-29 14:47:21 +02:00
Add settings page with adjustable jump forward/backward settings
This commit is contained in:
+37
-1
@@ -3,7 +3,35 @@ export const state = () => ({
|
||||
bookshelfListView: false,
|
||||
series: null,
|
||||
localMediaProgress: [],
|
||||
lastSearch: null
|
||||
lastSearch: null,
|
||||
jumpForwardItems: [
|
||||
{
|
||||
icon: 'forward_5',
|
||||
value: 5
|
||||
},
|
||||
{
|
||||
icon: 'forward_10',
|
||||
value: 10
|
||||
},
|
||||
{
|
||||
icon: 'forward_30',
|
||||
value: 30
|
||||
}
|
||||
],
|
||||
jumpBackwardsItems: [
|
||||
{
|
||||
icon: 'replay_5',
|
||||
value: 5
|
||||
},
|
||||
{
|
||||
icon: 'replay_10',
|
||||
value: 10
|
||||
},
|
||||
{
|
||||
icon: 'replay_30',
|
||||
value: 30
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
export const getters = {
|
||||
@@ -45,6 +73,14 @@ export const getters = {
|
||||
if (episodeId != null && lmp.episodeId != episodeId) return false
|
||||
return lmp.libraryItemId == libraryItemId
|
||||
})
|
||||
},
|
||||
getJumpForwardIcon: state => (jumpForwardTime) => {
|
||||
const item = state.jumpForwardItems.find(i => i.value == jumpForwardTime)
|
||||
return item ? item.icon : 'forward_10'
|
||||
},
|
||||
getJumpBackwardsIcon: state => (jumpBackwardsTime) => {
|
||||
const item = state.jumpBackwardsItems.find(i => i.value == jumpBackwardsTime)
|
||||
return item ? item.icon : 'replay_10'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user