mirror of
https://gitlab.com/bramw/baserow.git
synced 2025-04-10 15:47:32 +00:00
24 lines
425 B
JavaScript
24 lines
425 B
JavaScript
export const state = () => ({
|
|
collapsed: false
|
|
})
|
|
|
|
export const mutations = {
|
|
SET_COLLAPSED(state, collapsed) {
|
|
state.collapsed = collapsed
|
|
}
|
|
}
|
|
|
|
export const actions = {
|
|
toggleCollapsed({ commit, getters }, value) {
|
|
if (value === undefined) {
|
|
value = !getters.isCollapsed
|
|
}
|
|
commit('SET_COLLAPSED', value)
|
|
}
|
|
}
|
|
|
|
export const getters = {
|
|
isCollapsed(state) {
|
|
return !!state.collapsed
|
|
}
|
|
}
|