Added hotkeys for priority, delete and favorite on the TaskDetailView
All checks were successful
continuous-integration/drone/pr Build is passing

This commit is contained in:
primeapple 2023-04-19 14:41:41 +02:00
parent 35edcb5672
commit 6b09ee894c
4 changed files with 26 additions and 5 deletions

View File

@ -140,6 +140,18 @@ export const KEYBOARD_SHORTCUTS : ShortcutGroup[] = [
title: 'keyboardShortcuts.task.description', title: 'keyboardShortcuts.task.description',
keys: ['e'], keys: ['e'],
}, },
{
title: 'keyboardShortcuts.task.priority',
keys: ['p'],
},
{
title: 'keyboardShortcuts.task.delete',
keys: ['x'],
},
{
title: 'keyboardShortcuts.task.favorite',
keys: ['s'],
},
], ],
}, },
] ]

View File

@ -894,7 +894,10 @@
"color": "Die Farbe dieser Aufgabe ändern", "color": "Die Farbe dieser Aufgabe ändern",
"move": "Move this task to another project", "move": "Move this task to another project",
"reminder": "Erinnerungen für diese Aufgabe verwalten", "reminder": "Erinnerungen für diese Aufgabe verwalten",
"description": "Aufgabenbeschreibung bearbeiten" "description": "Aufgabenbeschreibung bearbeiten",
"delete": "Diese Aufgabe löschen",
"priority": "Die Priorität dieser Aufgabe ändern",
"favorite": "Aufgabe als Favorit hinzufügen / entfernen"
}, },
"project": { "project": {
"title": "Project Views", "title": "Project Views",
@ -1053,4 +1056,4 @@
"frontendVersion": "Frontend-Version: {version}", "frontendVersion": "Frontend-Version: {version}",
"apiVersion": "API-Version: {version}" "apiVersion": "API-Version: {version}"
} }
} }

View File

@ -897,7 +897,10 @@
"color": "Change the color of this task", "color": "Change the color of this task",
"move": "Move this task to another project", "move": "Move this task to another project",
"reminder": "Manage reminders of this task", "reminder": "Manage reminders of this task",
"description": "Toggle editing of the task description" "description": "Toggle editing of the task description",
"delete": "Delete this task",
"priority": "Change the priority of this task",
"favorite": "Mark this task as favorite / unfavorite"
}, },
"project": { "project": {
"title": "Project Views", "title": "Project Views",
@ -1056,4 +1059,4 @@
"frontendVersion": "Frontend Version: {version}", "frontendVersion": "Frontend Version: {version}",
"apiVersion": "API Version: {version}" "apiVersion": "API Version: {version}"
} }
} }

View File

@ -322,6 +322,7 @@
@click="setFieldActive('priority')" @click="setFieldActive('priority')"
variant="secondary" variant="secondary"
icon="exclamation" icon="exclamation"
v-shortcut="'p'"
> >
{{ $t('task.detail.actions.priority') }} {{ $t('task.detail.actions.priority') }}
</x-button> </x-button>
@ -406,6 +407,7 @@
@click="toggleFavorite" @click="toggleFavorite"
variant="secondary" variant="secondary"
:icon="task.isFavorite ? 'star' : ['far', 'star']" :icon="task.isFavorite ? 'star' : ['far', 'star']"
v-shortcut="'s'"
> >
{{ {{
task.isFavorite ? $t('task.detail.actions.unfavorite') : $t('task.detail.actions.favorite') task.isFavorite ? $t('task.detail.actions.unfavorite') : $t('task.detail.actions.favorite')
@ -416,6 +418,7 @@
icon="trash-alt" icon="trash-alt"
:shadow="false" :shadow="false"
class="is-danger is-outlined has-no-border" class="is-danger is-outlined has-no-border"
v-shortcut="'x'"
> >
{{ $t('task.detail.actions.delete') }} {{ $t('task.detail.actions.delete') }}
</x-button> </x-button>