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