feat: Interactive deck board widget

Signed-off-by: Julius Härtl <jus@bitgrid.net>

fix: Provide relevant app state for widgets

Signed-off-by: Julius Härtl <jus@bitgrid.net>

fix: Adapt interactive widget

Signed-off-by: Julius Härtl <jus@bitgrid.net>

chore: fixup

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2024-02-02 14:17:35 +01:00
parent 632e70bc29
commit 5b33fcca0d
7 changed files with 112 additions and 32 deletions

View File

@@ -58,6 +58,7 @@ export default new Vuex.Store({
},
strict: debug,
state: {
isFullApp: true,
config: loadState('deck', 'config', {}),
showArchived: false,
navShown: localStorage.getItem('deck.navShown') === null || localStorage.getItem('deck.navShown') === 'true',
@@ -78,6 +79,10 @@ export default new Vuex.Store({
},
getters: {
config: state => (key) => {
if (!state.isFullApp && key === 'cardDetailsInModal') {
return true
}
return state.config[key]
},
getSearchQuery: state => {
@@ -140,6 +145,9 @@ export default new Vuex.Store({
},
},
mutations: {
setFullApp(state, isFullApp) {
Vue.set(state, 'isFullApp', isFullApp)
},
SET_CONFIG(state, { key, value }) {
const [scope, id, configKey] = key.split(':', 3)
let indexExisting = -1
@@ -313,6 +321,9 @@ export default new Vuex.Store({
},
},
actions: {
setFullApp({ commit }, isFullApp) {
commit('setFullApp', isFullApp)
},
async setConfig({ commit }, config) {
for (const key in config) {
try {