diff options
Diffstat (limited to 'src/client')
| -rw-r--r-- | src/client/app/app.vue | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/client/app/app.vue b/src/client/app/app.vue index 7a46e7dea0..9de01ef060 100644 --- a/src/client/app/app.vue +++ b/src/client/app/app.vue @@ -1,3 +1,24 @@ <template> -<router-view id="app"></router-view> +<router-view id="app" v-hotkey.global="keymap"></router-view> </template> + +<script lang="ts"> +import Vue from 'vue'; +import { url, lang } from './config'; + +export default Vue.extend({ + computed: { + keymap(): any { + return { + 'h|slash': this.help + }; + } + }, + + methods: { + help() { + window.open(`${url}/docs/${lang}/keyboard-shortcut`, '_blank'); + } + } +}); +</script> |