2018-02-09 19:52:26 -06:00
|
|
|
<template>
|
2018-09-18 18:36:06 -05:00
|
|
|
<router-view id="app" v-hotkey.global="keymap"></router-view>
|
2018-02-09 19:52:26 -06:00
|
|
|
</template>
|
2018-09-18 18:36:06 -05:00
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import Vue from 'vue';
|
|
|
|
import { url, lang } from './config';
|
2018-09-26 04:59:37 -05:00
|
|
|
import applyTheme from './common/scripts/theme';
|
2018-09-26 05:14:11 -05:00
|
|
|
const darkTheme = require('../theme/dark');
|
2018-09-18 18:36:06 -05:00
|
|
|
|
|
|
|
export default Vue.extend({
|
|
|
|
computed: {
|
|
|
|
keymap(): any {
|
|
|
|
return {
|
2018-09-22 17:59:48 -05:00
|
|
|
'h|slash': this.help,
|
|
|
|
'd': this.dark
|
2018-09-18 18:36:06 -05:00
|
|
|
};
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
help() {
|
|
|
|
window.open(`${url}/docs/${lang}/keyboard-shortcut`, '_blank');
|
2018-09-22 17:59:48 -05:00
|
|
|
},
|
|
|
|
|
|
|
|
dark() {
|
2018-09-26 04:59:37 -05:00
|
|
|
applyTheme(darkTheme);
|
2018-09-18 18:36:06 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|