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
+12
View File
@@ -1,6 +1,7 @@
import { Network } from '@capacitor/network'
export const state = () => ({
deviceData: null,
playerLibraryItemId: null,
playerEpisodeId: null,
playerIsLocal: false,
@@ -35,6 +36,14 @@ export const getters = {
if (!state.serverSettings) return 1
return state.serverSettings.coverAspectRatio === 0 ? 1.6 : 1
},
getJumpForwardTime: state => {
if (!state.deviceData || !state.deviceData.deviceSettings) return 10
return state.deviceData.deviceSettings.jumpForwardTime || 10
},
getJumpBackwardsTime: state => {
if (!state.deviceData || !state.deviceData.deviceSettings) return 10
return state.deviceData.deviceSettings.jumpBackwardsTime || 10
}
}
export const actions = {
@@ -55,6 +64,9 @@ export const actions = {
}
export const mutations = {
setDeviceData(state, deviceData) {
state.deviceData = deviceData
},
setLastBookshelfScrollData(state, { scrollTop, path, name }) {
state.lastBookshelfScrollData[name] = { scrollTop, path }
},