2018-02-10 03:52:26 +02:00
|
|
|
<template>
|
2018-09-19 02:36:06 +03:00
|
|
|
<router-view id="app" v-hotkey.global="keymap"></router-view>
|
2018-02-10 03:52:26 +02:00
|
|
|
</template>
|
2018-09-19 02:36:06 +03:00
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import Vue from 'vue';
|
|
|
|
import { url, lang } from './config';
|
|
|
|
|
|
|
|
export default Vue.extend({
|
|
|
|
computed: {
|
|
|
|
keymap(): any {
|
|
|
|
return {
|
2018-09-23 01:59:48 +03:00
|
|
|
'h|slash': this.help,
|
|
|
|
'd': this.dark
|
2018-09-19 02:36:06 +03:00
|
|
|
};
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
help() {
|
|
|
|
window.open(`${url}/docs/${lang}/keyboard-shortcut`, '_blank');
|
2018-09-23 01:59:48 +03:00
|
|
|
},
|
|
|
|
|
|
|
|
dark() {
|
|
|
|
this.$store.commit('device/set', {
|
|
|
|
key: 'darkmode',
|
|
|
|
value: !this.$store.state.device.darkmode
|
|
|
|
});
|
2018-09-19 02:36:06 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|