unshare board

Signed-off-by: Jakob Röhrl <jakob.roehrl@web.de>
This commit is contained in:
Jakob Röhrl
2020-05-19 12:47:01 +02:00
parent 82b8d17f6c
commit 18621caa60
2 changed files with 18 additions and 0 deletions

View File

@@ -236,6 +236,18 @@ export default {
text: t('deck', 'Board details'),
})
if (this.board.shared) {
actions.push({
action: () => {
this.hideMenu()
this.loading = true
this.$store.dispatch('unshareBoard', this.board)
},
icon: 'icon-delete',
text: t('deck', 'Unshare board'),
})
}
}
return actions

View File

@@ -417,5 +417,11 @@ export default new Vuex.Store({
dispatch('loadBoardById', acl.boardId)
})
},
unshareBoard({ commit }, board) {
apiClient.unshareBoard(board)
.then((board) => {
commit('removeBoard', board)
})
},
},
})