nanka iroiro

This commit is contained in:
syuilo
2020-12-27 17:04:41 +09:00
parent 03667e1fe6
commit 3fc427b699
9 changed files with 110 additions and 158 deletions

View File

@ -1,5 +1,5 @@
<template>
<div class="mk-app" v-hotkey.global="keymap" :class="{ wallpaper }">
<div class="mk-app" :class="{ wallpaper }">
<XSidebar ref="nav" class="sidebar"/>
<div class="contents" ref="contents">
@ -57,7 +57,6 @@ import { defineComponent, defineAsyncComponent, markRaw } from 'vue';
import { faLayerGroup, faBars, faHome, faCircle, faWindowMaximize, faColumns, faPencilAlt } from '@fortawesome/free-solid-svg-icons';
import { faBell } from '@fortawesome/free-regular-svg-icons';
import { host } from '@/config';
import { search } from '@/scripts/search';
import { StickySidebar } from '@/scripts/sticky-sidebar';
import XSidebar from '@/components/sidebar.vue';
import XCommon from './_common_/common.vue';
@ -65,7 +64,6 @@ import XHeader from './_common_/header.vue';
import XSide from './default.side.vue';
import * as os from '@/os';
import { sidebarDef } from '@/sidebar';
import { ColdDeviceStorage } from '@/store';
const DESKTOP_THRESHOLD = 1100;
@ -101,19 +99,6 @@ export default defineComponent({
},
computed: {
keymap(): any {
return {
'd': () => {
if (ColdDeviceStorage.get('syncDeviceDarkMode')) return;
this.$store.set('darkMode', !this.$store.state.darkMode);
},
'p': os.post,
'n': os.post,
's': () => search(),
'h|/': this.help
};
},
navIndicated(): boolean {
for (const def in this.menuDef) {
if (def === 'notifications') continue; // 通知は下にボタンとして表示されてるから
@ -199,10 +184,6 @@ export default defineComponent({
window.scroll({ top: 0, behavior: 'smooth' });
},
help() {
this.$router.push('/docs/keyboard-shortcut');
},
onTransition() {
if (window._scroll) window._scroll();
},