forked from vikunja/frontend
feat: add new shortcuts to docs
This commit is contained in:
parent
c79a22661f
commit
36c4027af6
|
@ -14,6 +14,7 @@
|
|||
<strong>{{ $t('keyboardShortcuts.quickSearch') }}</strong>
|
||||
<shortcut :keys="['ctrl', 'k']"/>
|
||||
</p>
|
||||
|
||||
<h3>{{ $t('list.kanban.title') }}</h3>
|
||||
<div class="message is-primary" v-if="$route.name === 'list.kanban'">
|
||||
<div class="message-body">
|
||||
|
@ -24,10 +25,34 @@
|
|||
<strong>{{ $t('keyboardShortcuts.task.done') }}</strong>
|
||||
<shortcut :keys="['ctrl', 'click']"/>
|
||||
</p>
|
||||
|
||||
<h3>{{ $t('keyboardShortcuts.list.title') }}</h3>
|
||||
<div class="message is-primary" v-if="isListPage">
|
||||
<div class="message-body">
|
||||
{{ $t('keyboardShortcuts.currentPageOnly') }}
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
<strong>{{ $t('keyboardShortcuts.list.switchToListView') }}</strong>
|
||||
<shortcut :keys="['g', 'l']" :combination="$t('keyboardShortcuts.then')"/>
|
||||
</p>
|
||||
<p>
|
||||
<strong>{{ $t('keyboardShortcuts.list.switchToGanttView') }}</strong>
|
||||
<shortcut :keys="['g', 'g']" :combination="$t('keyboardShortcuts.then')"/>
|
||||
</p>
|
||||
<p>
|
||||
<strong>{{ $t('keyboardShortcuts.list.switchToTableView') }}</strong>
|
||||
<shortcut :keys="['g', 't']" :combination="$t('keyboardShortcuts.then')"/>
|
||||
</p>
|
||||
<p>
|
||||
<strong>{{ $t('keyboardShortcuts.list.switchToKanbanView') }}</strong>
|
||||
<shortcut :keys="['g', 'k']" :combination="$t('keyboardShortcuts.then')"/>
|
||||
</p>
|
||||
|
||||
<h3>{{ $t('keyboardShortcuts.task.title') }}</h3>
|
||||
<div
|
||||
class="message is-primary"
|
||||
v-if="$route.name === 'task.detail' || $route.name === 'task.list.detail' || $route.name === 'task.gantt.detail' || $route.name === 'task.kanban.detail' || $route.name === 'task.detail'">
|
||||
v-if="isTaskPage">
|
||||
<div class="message-body">
|
||||
{{ $t('keyboardShortcuts.currentPageOnly') }}
|
||||
</div>
|
||||
|
@ -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)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<span class="shortcuts">
|
||||
<template v-for="(k, i) in keys" :key="i">
|
||||
<kbd>{{ k }}</kbd>
|
||||
<span v-if="i < keys.length - 1">+</span>
|
||||
<span v-if="i < keys.length - 1">{{ combination }}</span>
|
||||
</template>
|
||||
</span>
|
||||
</template>
|
||||
|
@ -15,6 +15,10 @@ export default {
|
|||
type: Array,
|
||||
required: true,
|
||||
},
|
||||
combination: {
|
||||
type: String,
|
||||
default: '+',
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -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": {
|
||||
|
|
Loading…
Reference in New Issue
Block a user