@@ -189,16 +189,32 @@ export default {
|
|||||||
|
|
||||||
actions.push({
|
actions.push({
|
||||||
action: () => {
|
action: () => {
|
||||||
this.hideMenu()
|
OC.dialogs.confirmDestructive(
|
||||||
this.loading = true
|
t('deck', 'Are you sure you want to delete the board {title}? This will delete all the data of this board.', { title: this.board.title }),
|
||||||
this.boardApi.deleteBoard(this.board)
|
t('deck', 'Delete the board?'),
|
||||||
.then(() => {
|
{
|
||||||
this.loading = false
|
type: OC.dialogs.YES_NO_BUTTONS,
|
||||||
this.deleted = true
|
confirm: t('deck', 'Delete'),
|
||||||
this.undoTimeoutHandle = setTimeout(() => {
|
confirmClasses: 'error',
|
||||||
this.$store.dispatch('removeBoard', this.board)
|
cancel: t('deck', 'Cancel'),
|
||||||
}, 7000)
|
},
|
||||||
})
|
(result) => {
|
||||||
|
if (result) {
|
||||||
|
this.hideMenu()
|
||||||
|
this.loading = true
|
||||||
|
this.boardApi.deleteBoard(this.board)
|
||||||
|
.then(() => {
|
||||||
|
this.loading = false
|
||||||
|
this.deleted = true
|
||||||
|
this.undoTimeoutHandle = setTimeout(() => {
|
||||||
|
this.$store.dispatch('removeBoard', this.board)
|
||||||
|
}, 7000)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
true
|
||||||
|
)
|
||||||
|
|
||||||
},
|
},
|
||||||
icon: 'icon-delete',
|
icon: 'icon-delete',
|
||||||
text: t('deck', 'Delete board'),
|
text: t('deck', 'Delete board'),
|
||||||
|
|||||||
Reference in New Issue
Block a user