Add settings page with adjustable jump forward/backward settings

This commit is contained in:
advplyr
2022-07-01 20:05:11 -05:00
parent a41e26e4c6
commit 3c1120ea48
13 changed files with 162 additions and 66 deletions
+37 -1
View File
@@ -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'
}
}