mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-24 13:09:07 +01:00
33 lines
538 B
Vue
33 lines
538 B
Vue
<template>
|
|
<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,
|
|
'd': this.dark
|
|
};
|
|
}
|
|
},
|
|
|
|
methods: {
|
|
help() {
|
|
window.open(`${url}/docs/${lang}/keyboard-shortcut`, '_blank');
|
|
},
|
|
|
|
dark() {
|
|
this.$store.commit('device/set', {
|
|
key: 'darkmode',
|
|
value: !this.$store.state.device.darkmode
|
|
});
|
|
}
|
|
}
|
|
});
|
|
</script>
|