diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2020-11-03 17:00:47 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2020-11-03 17:00:47 +0900 |
| commit | d7085b17fec7c55339efacb9e072f2228e1fc97a (patch) | |
| tree | c4e263455e4e1aa88071c5b58acb3da45874b5e6 /src/client/ui | |
| parent | Tweak page window initial size (diff) | |
| download | misskey-d7085b17fec7c55339efacb9e072f2228e1fc97a.tar.gz misskey-d7085b17fec7c55339efacb9e072f2228e1fc97a.tar.bz2 misskey-d7085b17fec7c55339efacb9e072f2228e1fc97a.zip | |
wip: Desktop UI
Diffstat (limited to 'src/client/ui')
| -rw-r--r-- | src/client/ui/desktop.vue | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/src/client/ui/desktop.vue b/src/client/ui/desktop.vue new file mode 100644 index 0000000000..0d266ae016 --- /dev/null +++ b/src/client/ui/desktop.vue @@ -0,0 +1,66 @@ +<template> +<div class="mk-app" v-hotkey.global="keymap" :class="{ wallpaper }" @contextmenu.prevent="() => {}"> + <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'; + +export default defineComponent({ + components: { + XCommon, + XSidebar + }, + + data() { + return { + host: host, + menuDef: sidebarDef, + wallpaper: localStorage.getItem('wallpaper') != null, + }; + }, + + computed: { + keymap(): any { + return { + 'd': () => { + if (this.$store.state.device.syncDeviceDarkMode) return; + this.$store.commit('device/set', { key: 'darkMode', value: !this.$store.state.device.darkMode }); + }, + 'p': os.post, + 'n': os.post, + 's': () => search(), + 'h|/': this.help + }; + }, + + menu(): string[] { + return this.$store.state.deviceUser.menu; + }, + }, + + + methods: { + help() { + this.$router.push('/docs/keyboard-shortcut'); + }, + } +}); +</script> + +<style lang="scss" scoped> +.mk-app { +} +</style> + +<style lang="scss"> +</style> |