Clone boards with stacks, labels (#1221)

Clone boards with stacks, labels
This commit is contained in:
Julius Härtl
2019-10-10 09:03:34 +02:00
committed by GitHub
8 changed files with 110 additions and 3 deletions

View File

@@ -130,6 +130,25 @@ export default {
text: t('deck', 'Edit board')
})
actions.push({
action: async() => {
this.hideMenu()
this.loading = true
try {
const newBoard = await this.$store.dispatch('cloneBoard', this.board)
this.loading = false
const route = this.routeTo
route.params.id = newBoard.id
this.$router.push(route)
} catch (e) {
OC.Notification.showTemporary(t('deck', 'An error occurred'))
console.error(e)
}
},
icon: 'icon-clone',
text: t('deck', 'Clone board')
})
if (!this.board.archived) {
actions.push({
action: () => {