diff --git a/src/components/navigation/AppNavigationBoard.vue b/src/components/navigation/AppNavigationBoard.vue index d8e5c2667..1df7e8fbd 100644 --- a/src/components/navigation/AppNavigationBoard.vue +++ b/src/components/navigation/AppNavigationBoard.vue @@ -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 diff --git a/src/store/main.js b/src/store/main.js index f65cfc90d..afd9bb73d 100644 --- a/src/store/main.js +++ b/src/store/main.js @@ -417,5 +417,11 @@ export default new Vuex.Store({ dispatch('loadBoardById', acl.boardId) }) }, + unshareBoard({ commit }, board) { + apiClient.unshareBoard(board) + .then((board) => { + commit('removeBoard', board) + }) + }, }, })