feat: add a few new keyboard shortcuts

This commit is contained in:
kolaente 2022-03-02 21:59:51 +01:00
parent 8849e5bee1
commit f4b0e68322
No known key found for this signature in database
GPG Key ID: F40E70337AB24C9B
4 changed files with 63 additions and 8 deletions

View File

@ -6,7 +6,7 @@
</router-link> </router-link>
<ul class="menu-list"> <ul class="menu-list">
<li> <li>
<router-link :to="{ name: 'home'}"> <router-link :to="{ name: 'home'}" v-shortcut="'g o'">
<span class="icon"> <span class="icon">
<icon icon="calendar"/> <icon icon="calendar"/>
</span> </span>
@ -14,7 +14,7 @@
</router-link> </router-link>
</li> </li>
<li> <li>
<router-link :to="{ name: 'tasks.range'}"> <router-link :to="{ name: 'tasks.range'}" v-shortcut="'g u'">
<span class="icon"> <span class="icon">
<icon :icon="['far', 'calendar-alt']"/> <icon :icon="['far', 'calendar-alt']"/>
</span> </span>
@ -22,7 +22,7 @@
</router-link> </router-link>
</li> </li>
<li> <li>
<router-link :to="{ name: 'namespaces.index'}"> <router-link :to="{ name: 'namespaces.index'}" v-shortcut="'g n'">
<span class="icon"> <span class="icon">
<icon icon="layer-group"/> <icon icon="layer-group"/>
</span> </span>
@ -30,7 +30,7 @@
</router-link> </router-link>
</li> </li>
<li> <li>
<router-link :to="{ name: 'labels.index'}"> <router-link :to="{ name: 'labels.index'}" v-shortcut="'g a'">
<span class="icon"> <span class="icon">
<icon icon="tags"/> <icon icon="tags"/>
</span> </span>
@ -38,7 +38,7 @@
</router-link> </router-link>
</li> </li>
<li> <li>
<router-link :to="{ name: 'teams.index'}"> <router-link :to="{ name: 'teams.index'}" v-shortcut="'g m'">
<span class="icon"> <span class="icon">
<icon icon="users"/> <icon icon="users"/>
</span> </span>

View File

@ -30,6 +30,36 @@ export const KEYBOARD_SHORTCUTS : ShortcutGroup[] = [
}, },
], ],
}, },
{
title: 'keyboardShortcuts.navigation.title',
shortcuts: [
{
title: 'keyboardShortcuts.navigation.overview',
keys: ['g', 'o'],
combination: 'then',
},
{
title: 'keyboardShortcuts.navigation.upcoming',
keys: ['g', 'u'],
combination: 'then',
},
{
title: 'keyboardShortcuts.navigation.namespaces',
keys: ['g', 'n'],
combination: 'then',
},
{
title: 'keyboardShortcuts.navigation.labels',
keys: ['g', 'a'],
combination: 'then',
},
{
title: 'keyboardShortcuts.navigation.teams',
keys: ['g', 'm'],
combination: 'then',
},
],
},
{ {
title: 'list.kanban.title', title: 'list.kanban.title',
available: (route) => route.name === 'list.kanban', available: (route) => route.name === 'list.kanban',
@ -70,6 +100,10 @@ export const KEYBOARD_SHORTCUTS : ShortcutGroup[] = [
title: 'keyboardShortcuts.task.title', title: 'keyboardShortcuts.task.title',
available: (route) => route.name === 'task.detail', available: (route) => route.name === 'task.detail',
shortcuts: [ shortcuts: [
{
title: 'keyboardShortcuts.task.done',
keys: ['t'],
},
{ {
title: 'keyboardShortcuts.task.assign', title: 'keyboardShortcuts.task.assign',
keys: ['a'], keys: ['a'],
@ -90,6 +124,14 @@ export const KEYBOARD_SHORTCUTS : ShortcutGroup[] = [
title: 'keyboardShortcuts.task.related', title: 'keyboardShortcuts.task.related',
keys: ['r'], keys: ['r'],
}, },
{
title: 'keyboardShortcuts.task.move',
keys: ['m'],
},
{
title: 'keyboardShortcuts.task.color',
keys: ['c'],
},
], ],
}, },
] ]

View File

@ -790,12 +790,14 @@
"then": "then", "then": "then",
"task": { "task": {
"title": "Task Page", "title": "Task Page",
"done": "Done", "done": "Mark task done / undone",
"assign": "Assign to a user", "assign": "Assign this task to a user",
"labels": "Add labels to this task", "labels": "Add labels to this task",
"dueDate": "Change the due date of this task", "dueDate": "Change the due date of this task",
"attachment": "Add an attachment to this task", "attachment": "Add an attachment to this task",
"related": "Modify related tasks of this task" "related": "Modify related tasks of this task",
"color": "Change the color of this task",
"move": "Move this task to another list"
}, },
"list": { "list": {
"title": "List Views", "title": "List Views",
@ -803,6 +805,14 @@
"switchToGanttView": "Switch to gantt view", "switchToGanttView": "Switch to gantt view",
"switchToKanbanView": "Switch to kanban view", "switchToKanbanView": "Switch to kanban view",
"switchToTableView": "Switch to table view" "switchToTableView": "Switch to table view"
},
"navigation": {
"title": "Navigation",
"overview": "Navigato to overview",
"upcoming": "Navigato to upcoming taks",
"namespaces": "Navigate to namepaces & lists",
"labels": "Navigate to labels",
"teams": "Navigate to teams"
} }
}, },
"update": { "update": {

View File

@ -259,6 +259,7 @@
class="is-outlined has-no-border" class="is-outlined has-no-border"
icon="check-double" icon="check-double"
variant="secondary" variant="secondary"
v-shortcut="'t'"
> >
{{ task.done ? $t('task.detail.undone') : $t('task.detail.done') }} {{ task.done ? $t('task.detail.undone') : $t('task.detail.done') }}
</x-button> </x-button>
@ -356,6 +357,7 @@
@click="setFieldActive('moveList')" @click="setFieldActive('moveList')"
variant="secondary" variant="secondary"
icon="list" icon="list"
v-shortcut="'m'"
> >
{{ $t('task.detail.actions.moveList') }} {{ $t('task.detail.actions.moveList') }}
</x-button> </x-button>
@ -363,6 +365,7 @@
@click="setFieldActive('color')" @click="setFieldActive('color')"
variant="secondary" variant="secondary"
icon="fill-drip" icon="fill-drip"
v-shortcut="'c'"
> >
{{ $t('task.detail.actions.color') }} {{ $t('task.detail.actions.color') }}
</x-button> </x-button>