added new functions

Signed-off-by: Jakob <jakob.roehrl@web.de>
This commit is contained in:
Jakob
2019-07-11 14:31:08 +02:00
committed by Julius Härtl
parent 408ea69272
commit fcabdbdc24
12 changed files with 235 additions and 45 deletions

View File

@@ -46,10 +46,12 @@ export default new Vuex.Store({
},
strict: debug,
state: {
showArchived: false,
navShown: true,
compactMode: false,
sidebarShown: false,
currentBoard: null,
currentCard: null,
boards: [],
sharees: [],
boardFilter: BOARD_FILTERS.ALL
@@ -90,6 +92,9 @@ export default new Vuex.Store({
}
},
mutations: {
toggleShowArchived(state) {
state.showArchived = !state.showArchived
},
/**
* Adds or replaces a board in the store.
* Matches a board by it's id.
@@ -143,6 +148,9 @@ export default new Vuex.Store({
setCurrentBoard(state, board) {
state.currentBoard = board
},
setCurrentCard(state, card) {
state.currentCard = card
},
// label mutators
removeLabelFromCurrentBoard(state, labelId) {
@@ -196,6 +204,9 @@ export default new Vuex.Store({
}
},
actions: {
toggleShowArchived({ commit }) {
commit('toggleShowArchived')
},
/**
* @param commit
* @param state
@@ -272,6 +283,9 @@ export default new Vuex.Store({
setCurrentBoard({ commit }, board) {
commit('setCurrentBoard', board)
},
setCurrentCard({ commit }, card) {
commit('setCurrentCard', card)
},
// label actions
removeLabelFromCurrentBoard({ commit }, label) {