@@ -24,10 +25,34 @@
{{ $t('keyboardShortcuts.task.done') }}
+
+
{{ $t('keyboardShortcuts.list.title') }}
+
+
+ {{ $t('keyboardShortcuts.currentPageOnly') }}
+
+
+
+ {{ $t('keyboardShortcuts.list.switchToListView') }}
+
+
+
+ {{ $t('keyboardShortcuts.list.switchToGanttView') }}
+
+
+
+ {{ $t('keyboardShortcuts.list.switchToTableView') }}
+
+
+
+ {{ $t('keyboardShortcuts.list.switchToKanbanView') }}
+
+
+
{{ $t('keyboardShortcuts.task.title') }}
+ v-if="isTaskPage">
{{ $t('keyboardShortcuts.currentPageOnly') }}
@@ -63,6 +88,18 @@ import Shortcut from '@/components/misc/shortcut.vue'
export default {
name: 'keyboard-shortcuts',
components: {Shortcut},
+ computed: {
+ isTaskPage() {
+ return this.$route.name === 'task.detail' ||
+ this.$route.name === 'task.list.detail' ||
+ this.$route.name === 'task.gantt.detail' ||
+ this.$route.name === 'task.kanban.detail' ||
+ this.$route.name === 'task.detail'
+ },
+ isListPage() {
+ return this.$route.name.startsWith('list.')
+ },
+ },
methods: {
close() {
this.$store.commit(KEYBOARD_SHORTCUTS_ACTIVE, false)
diff --git a/src/components/misc/shortcut.vue b/src/components/misc/shortcut.vue
index 5d155db20..a822cecb4 100644
--- a/src/components/misc/shortcut.vue
+++ b/src/components/misc/shortcut.vue
@@ -2,7 +2,7 @@
{{ k }}
- +
+ {{ combination }}
@@ -15,6 +15,10 @@ export default {
type: Array,
required: true,
},
+ combination: {
+ type: String,
+ default: '+',
+ },
},
}
diff --git a/src/i18n/lang/en.json b/src/i18n/lang/en.json
index 3d684db7e..11d93d598 100644
--- a/src/i18n/lang/en.json
+++ b/src/i18n/lang/en.json
@@ -747,6 +747,7 @@
"currentPageOnly": "These shortcuts work only on the current page.",
"toggleMenu": "Toggle The Menu",
"quickSearch": "Open the search/quick action bar",
+ "then": "then",
"task": {
"title": "Task Page",
"done": "Mark a task as done",
@@ -755,6 +756,13 @@
"dueDate": "Change the due date of this task",
"attachment": "Add an attachment to this task",
"related": "Modify related tasks of this task"
+ },
+ "list": {
+ "title": "List Views",
+ "switchToListView": "Switch to list view",
+ "switchToGanttView": "Switch to gantt view",
+ "switchToKanbanView": "Switch to kanban view",
+ "switchToTableView": "Switch to table view"
}
},
"update": {