Change: config page to multiple pages, Add: user permissions for accessible libraries #120, Add: map genre metadata tag #114, Add: experimental audio player keyboard controls #121, Add: view user audiobook progress list

This commit is contained in:
advplyr 2021-10-22 20:08:02 -05:00
parent 7d9ed75a28
commit ff1eeda468
42 changed files with 957 additions and 464 deletions

View file

@ -3,7 +3,6 @@ export const state = () => ({
lastLoad: 0,
listeners: [],
currentLibraryId: 'main',
showModal: false,
folders: [],
folderLastUpdate: 0
})
@ -42,12 +41,18 @@ export const actions = {
return []
})
},
fetch({ state, commit, rootState }, libraryId) {
fetch({ state, commit, rootState, rootGetters }, libraryId) {
if (!rootState.user || !rootState.user.user) {
console.error('libraries/fetch - User not set')
return false
}
var canUserAccessLibrary = rootGetters['user/getCanAccessLibrary'](libraryId)
if (!canUserAccessLibrary) {
console.warn('Access not allowed to library')
return false
}
var library = state.libraries.find(lib => lib.id === libraryId)
if (library) {
commit('setCurrentLibrary', libraryId)
@ -102,9 +107,6 @@ export const mutations = {
setFoldersLastUpdate(state) {
state.folderLastUpdate = Date.now()
},
setShowModal(state, val) {
state.showModal = val
},
setLastLoad(state) {
state.lastLoad = Date.now()
},