mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-04 02:05:06 +02:00
Add:Experimental change bookshelf texture #186
This commit is contained in:
parent
dd8a28848b
commit
3941da1144
20 changed files with 136 additions and 10 deletions
|
@ -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
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue