feat: add a few new keyboard shortcuts
continuous-integration/drone/push Build is passing Details

This commit is contained in:
kolaente 2022-03-02 21:59:51 +01:00
parent 8849e5bee1
commit f4b0e68322
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
4 changed files with 63 additions and 8 deletions

View File

@ -6,7 +6,7 @@
</router-link>
<ul class="menu-list">
<li>
<router-link :to="{ name: 'home'}">
<router-link :to="{ name: 'home'}" v-shortcut="'g o'">
<span class="icon">
<icon icon="calendar"/>
</span>
@ -14,7 +14,7 @@
</router-link>
</li>
<li>
<router-link :to="{ name: 'tasks.range'}">
<router-link :to="{ name: 'tasks.range'}" v-shortcut="'g u'">
<span class="icon">
<icon :icon="['far', 'calendar-alt']"/>
</span>
@ -22,7 +22,7 @@
</router-link>
</li>
<li>
<router-link :to="{ name: 'namespaces.index'}">
<router-link :to="{ name: 'namespaces.index'}" v-shortcut="'g n'">
<span class="icon">
<icon icon="layer-group"/>
</span>
@ -30,7 +30,7 @@
</router-link>
</li>
<li>
<router-link :to="{ name: 'labels.index'}">
<router-link :to="{ name: 'labels.index'}" v-shortcut="'g a'">
<span class="icon">
<icon icon="tags"/>
</span>
@ -38,7 +38,7 @@
</router-link>
</li>
<li>
<router-link :to="{ name: 'teams.index'}">
<router-link :to="{ name: 'teams.index'}" v-shortcut="'g m'">
<span class="icon">
<icon icon="users"/>
</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',
available: (route) => route.name === 'list.kanban',
@ -70,6 +100,10 @@ export const KEYBOARD_SHORTCUTS : ShortcutGroup[] = [
title: 'keyboardShortcuts.task.title',
available: (route) => route.name === 'task.detail',
shortcuts: [
{
title: 'keyboardShortcuts.task.done',
keys: ['t'],
},
{
title: 'keyboardShortcuts.task.assign',
keys: ['a'],
@ -90,6 +124,14 @@ export const KEYBOARD_SHORTCUTS : ShortcutGroup[] = [
title: 'keyboardShortcuts.task.related',
keys: ['r'],
},
{
title: 'keyboardShortcuts.task.move',
keys: ['m'],
},
{
title: 'keyboardShortcuts.task.color',
keys: ['c'],
},
],
},
]

View File

@ -790,12 +790,14 @@
"then": "then",
"task": {
"title": "Task Page",
"done": "Done",
"assign": "Assign to a user",
"done": "Mark task done / undone",
"assign": "Assign this task to a user",
"labels": "Add labels to this task",
"dueDate": "Change the due date of 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": {
"title": "List Views",
@ -803,6 +805,14 @@
"switchToGanttView": "Switch to gantt view",
"switchToKanbanView": "Switch to kanban 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": {

View File

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