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>
|
<strong>{{ $t('keyboardShortcuts.quickSearch') }}</strong>
|
||||||
<shortcut :keys="['ctrl', 'k']"/>
|
<shortcut :keys="['ctrl', 'k']"/>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h3>{{ $t('list.kanban.title') }}</h3>
|
<h3>{{ $t('list.kanban.title') }}</h3>
|
||||||
<div class="message is-primary" v-if="$route.name === 'list.kanban'">
|
<div class="message is-primary" v-if="$route.name === 'list.kanban'">
|
||||||
<div class="message-body">
|
<div class="message-body">
|
||||||
|
@ -24,10 +25,34 @@
|
||||||
<strong>{{ $t('keyboardShortcuts.task.done') }}</strong>
|
<strong>{{ $t('keyboardShortcuts.task.done') }}</strong>
|
||||||
<shortcut :keys="['ctrl', 'click']"/>
|
<shortcut :keys="['ctrl', 'click']"/>
|
||||||
</p>
|
</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>
|
<h3>{{ $t('keyboardShortcuts.task.title') }}</h3>
|
||||||
<div
|
<div
|
||||||
class="message is-primary"
|
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">
|
<div class="message-body">
|
||||||
{{ $t('keyboardShortcuts.currentPageOnly') }}
|
{{ $t('keyboardShortcuts.currentPageOnly') }}
|
||||||
</div>
|
</div>
|
||||||
|
@ -63,6 +88,18 @@ import Shortcut from '@/components/misc/shortcut.vue'
|
||||||
export default {
|
export default {
|
||||||
name: 'keyboard-shortcuts',
|
name: 'keyboard-shortcuts',
|
||||||
components: {Shortcut},
|
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: {
|
methods: {
|
||||||
close() {
|
close() {
|
||||||
this.$store.commit(KEYBOARD_SHORTCUTS_ACTIVE, false)
|
this.$store.commit(KEYBOARD_SHORTCUTS_ACTIVE, false)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<span class="shortcuts">
|
<span class="shortcuts">
|
||||||
<template v-for="(k, i) in keys" :key="i">
|
<template v-for="(k, i) in keys" :key="i">
|
||||||
<kbd>{{ k }}</kbd>
|
<kbd>{{ k }}</kbd>
|
||||||
<span v-if="i < keys.length - 1">+</span>
|
<span v-if="i < keys.length - 1">{{ combination }}</span>
|
||||||
</template>
|
</template>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
@ -15,6 +15,10 @@ export default {
|
||||||
type: Array,
|
type: Array,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
|
combination: {
|
||||||
|
type: String,
|
||||||
|
default: '+',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -747,6 +747,7 @@
|
||||||
"currentPageOnly": "These shortcuts work only on the current page.",
|
"currentPageOnly": "These shortcuts work only on the current page.",
|
||||||
"toggleMenu": "Toggle The Menu",
|
"toggleMenu": "Toggle The Menu",
|
||||||
"quickSearch": "Open the search/quick action bar",
|
"quickSearch": "Open the search/quick action bar",
|
||||||
|
"then": "then",
|
||||||
"task": {
|
"task": {
|
||||||
"title": "Task Page",
|
"title": "Task Page",
|
||||||
"done": "Mark a task as done",
|
"done": "Mark a task as done",
|
||||||
|
@ -755,6 +756,13 @@
|
||||||
"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"
|
||||||
|
},
|
||||||
|
"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": {
|
"update": {
|
||||||
|
|
Loading…
Reference in New Issue