Quick Actions & global search #528

Merged
konrad merged 17 commits from feature/quick-action into main 2021-05-30 18:30:08 +00:00
1 changed files with 24 additions and 18 deletions
Showing only changes of commit a619a89db8 - Show all commits

View File

@ -71,24 +71,6 @@ export default {
data() {
return {
query: '',
availableCmds: [
{
title: 'New task',
action: CMD_NEW_TASK,
},
{
title: 'New list',
action: CMD_NEW_LIST,
},
{
title: 'New namespace',
action: CMD_NEW_NAMESPACE,
},
{
title: 'New Team',
action: CMD_NEW_TEAM,
},
],
selectedCmd: null,
foundTasks: [],
@ -163,6 +145,30 @@ export default {
currentList() {
return Object.keys(this.$store.state[CURRENT_LIST]).length === 0 ? null : this.$store.state[CURRENT_LIST]
},
availableCmds() {
const cmds = []
if (this.currentList !== null) {
cmds.push({
title: 'New task',
action: CMD_NEW_TASK,
})
cmds.push({
title: 'New list',
action: CMD_NEW_LIST,
})
}
cmds.push({
title: 'New namespace',
action: CMD_NEW_NAMESPACE,
})
cmds.push({
title: 'New Team',
action: CMD_NEW_TEAM,
})
return cmds
},
},
created() {
this.taskService = new TaskService()