Re implement the navigation
Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
This commit is contained in:
@@ -52,17 +52,17 @@ export default new Vuex.Store({
|
||||
},
|
||||
noneArchivedBoards: state => {
|
||||
return state.boards.filter(board => {
|
||||
return board.archived === false
|
||||
return board.archived === false && !board.deletedAt
|
||||
})
|
||||
},
|
||||
archivedBoards: state => {
|
||||
return state.boards.filter(board => {
|
||||
return board.archived === true
|
||||
return board.archived === true && !board.deletedAt
|
||||
})
|
||||
},
|
||||
sharedBoards: state => {
|
||||
return state.boards.filter(board => {
|
||||
return board.shared
|
||||
return board.shared && !board.deletedAt
|
||||
})
|
||||
},
|
||||
filteredBoards: state => {
|
||||
@@ -87,6 +87,17 @@ export default new Vuex.Store({
|
||||
state.boards.push(board)
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Removes the board from the store.
|
||||
*
|
||||
* @param state
|
||||
* @param board
|
||||
*/
|
||||
removeBoard(state, board) {
|
||||
state.boards = state.boards.filter((b) => {
|
||||
return board.id !== b.id
|
||||
})
|
||||
},
|
||||
toggleNav(state) {
|
||||
state.navShown = !state.navShown
|
||||
},
|
||||
@@ -123,6 +134,9 @@ export default new Vuex.Store({
|
||||
commit('addBoard', board)
|
||||
})
|
||||
},
|
||||
removeBoard({ commit }, board) {
|
||||
commit('removeBoard', board)
|
||||
},
|
||||
setBoards({ commit }, boards) {
|
||||
commit('setBoards', boards)
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user