mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-06-07 19:22:43 +02:00
Add:Experimental change bookshelf texture #186
This commit is contained in:
@@ -3,7 +3,8 @@ export const state = () => ({
|
||||
showBatchUserCollectionModal: false,
|
||||
showUserCollectionsModal: false,
|
||||
showEditCollectionModal: false,
|
||||
selectedCollection: null
|
||||
selectedCollection: null,
|
||||
showBookshelfTextureModal: false
|
||||
})
|
||||
|
||||
export const getters = {
|
||||
@@ -29,5 +30,9 @@ export const mutations = {
|
||||
setEditCollection(state, collection) {
|
||||
state.selectedCollection = collection
|
||||
state.showEditCollectionModal = true
|
||||
},
|
||||
setShowBookshelfTextureModal(state, val) {
|
||||
state.showBookshelfTextureModal = val
|
||||
console.log('shopw', val)
|
||||
}
|
||||
}
|
||||
+10
-1
@@ -20,7 +20,8 @@ export const state = () => ({
|
||||
showExperimentalFeatures: false,
|
||||
backups: [],
|
||||
bookshelfBookIds: [],
|
||||
openModal: null
|
||||
openModal: null,
|
||||
selectedBookshelfTexture: '/textures/wood_default.jpg'
|
||||
})
|
||||
|
||||
export const getters = {
|
||||
@@ -69,6 +70,11 @@ export const actions = {
|
||||
var last = _history.pop()
|
||||
commit('setRouteHistory', _history)
|
||||
return last
|
||||
},
|
||||
setBookshelfTexture({ commit, state }, img) {
|
||||
let root = document.documentElement;
|
||||
commit('setBookshelfTexture', img)
|
||||
root.style.setProperty('--bookshelf-texture-img', `url(${img})`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,5 +184,8 @@ export const mutations = {
|
||||
},
|
||||
setOpenModal(state, val) {
|
||||
state.openModal = val
|
||||
},
|
||||
setBookshelfTexture(state, val) {
|
||||
state.selectedBookshelfTexture = val
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user