audiobookshelf/client/store/globals.js
2021-11-27 16:01:53 -06:00

33 lines
750 B
JavaScript

export const state = () => ({
showBatchUserCollectionModal: false,
showUserCollectionsModal: false,
showEditCollectionModal: false,
selectedCollection: null
})
export const getters = {
}
export const actions = {
}
export const mutations = {
setShowUserCollectionsModal(state, val) {
state.showBatchUserCollectionModal = false
state.showUserCollectionsModal = val
},
setShowBatchUserCollectionsModal(state, val) {
state.showBatchUserCollectionModal = true
state.showUserCollectionsModal = val
},
setShowEditCollectionModal(state, val) {
state.showEditCollectionModal = val
},
setEditCollection(state, collection) {
state.selectedCollection = collection
state.showEditCollectionModal = true
}
}