iceshrimp/src/client/ui/desktop.vue

63 lines
1.1 KiB
Vue
Raw Normal View History

2020-11-03 17:00:47 +09:00
<template>
2020-12-27 17:04:41 +09:00
<div class="mk-app" :class="{ wallpaper }" @contextmenu.prevent="() => {}">
2020-11-03 17:00:47 +09:00
<XSidebar ref="nav" class="sidebar"/>
<XCommon/>
</div>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import { host } from '@/config';
import { search } from '@/scripts/search';
import XCommon from './_common_/common.vue';
import * as os from '@/os';
import XSidebar from '@/components/sidebar.vue';
import { sidebarDef } from '@/sidebar';
import { ColdDeviceStorage } from '@/store';
2020-11-03 17:00:47 +09:00
export default defineComponent({
components: {
XCommon,
XSidebar
},
data() {
return {
host: host,
menuDef: sidebarDef,
wallpaper: localStorage.getItem('wallpaper') != null,
};
},
computed: {
menu(): string[] {
return this.$store.state.menu;
2020-11-03 17:00:47 +09:00
},
},
created() {
if (window.innerWidth < 1024) {
localStorage.setItem('ui', 'default');
location.reload();
}
},
2020-11-03 17:00:47 +09:00
methods: {
help() {
this.$router.push('/docs/keyboard-shortcut');
},
}
});
</script>
<style lang="scss" scoped>
.mk-app {
2020-11-03 17:04:37 +09:00
height: 100vh;
width: 100vw;
2020-11-03 17:00:47 +09:00
}
</style>
<style lang="scss">
</style>