Remove archive action from archived boards
Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
This commit is contained in:
@@ -23,33 +23,38 @@
|
|||||||
import store from './../store/main'
|
import store from './../store/main'
|
||||||
|
|
||||||
function boardActions(board) {
|
function boardActions(board) {
|
||||||
return [
|
const actions = [{
|
||||||
{
|
action: () => {
|
||||||
action: () => {
|
|
||||||
},
|
|
||||||
icon: 'icon-edit',
|
|
||||||
text: t('deck', 'Edit board')
|
|
||||||
},
|
},
|
||||||
{
|
icon: 'icon-edit',
|
||||||
|
text: t('deck', 'Edit board')
|
||||||
|
}]
|
||||||
|
|
||||||
|
if (!board.archived) {
|
||||||
|
actions.push({
|
||||||
action: function() {
|
action: function() {
|
||||||
store.dispatch('archiveBoard', board)
|
store.dispatch('archiveBoard', board)
|
||||||
},
|
},
|
||||||
icon: 'icon-archive',
|
icon: 'icon-archive',
|
||||||
text: t('deck', 'Archive board')
|
text: t('deck', 'Archive board')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
actions.push({
|
||||||
|
action: () => {
|
||||||
},
|
},
|
||||||
{
|
icon: 'icon-delete',
|
||||||
action: () => {
|
text: t('deck', 'Delete board')
|
||||||
},
|
})
|
||||||
icon: 'icon-delete',
|
|
||||||
text: t('deck', 'Delete board')
|
actions.push({
|
||||||
|
action: () => {
|
||||||
},
|
},
|
||||||
{
|
icon: 'icon-settings',
|
||||||
action: () => {
|
text: t('deck', 'Board details')
|
||||||
},
|
})
|
||||||
icon: 'icon-settings',
|
|
||||||
text: t('deck', 'Board details')
|
return actions
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user