Compare commits

...

1 Commits

Author SHA1 Message Date
Jakob Röhrl
18621caa60 unshare board
Signed-off-by: Jakob Röhrl <jakob.roehrl@web.de>
2020-05-19 12:47:01 +02:00
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)
})
},
},
})