summaryrefslogtreecommitdiff
path: root/src/client/ui
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2020-12-27 17:04:41 +0900
committersyuilo <syuilotan@yahoo.co.jp>2020-12-27 17:04:41 +0900
commit3fc427b699b580f0dacbf7484174879a8df88f8a (patch)
tree0f36adfd5e98b306d8379e7b39c33ec7f69e4bfa /src/client/ui
parentDelete const.json (diff)
downloadsharkey-3fc427b699b580f0dacbf7484174879a8df88f8a.tar.gz
sharkey-3fc427b699b580f0dacbf7484174879a8df88f8a.tar.bz2
sharkey-3fc427b699b580f0dacbf7484174879a8df88f8a.zip
nanka iroiro
Diffstat (limited to 'src/client/ui')
-rw-r--r--src/client/ui/_common_/common.vue2
-rw-r--r--src/client/ui/deck.vue11
-rw-r--r--src/client/ui/default.vue21
-rw-r--r--src/client/ui/desktop.vue15
-rw-r--r--src/client/ui/zen.vue20
5 files changed, 5 insertions, 64 deletions
diff --git a/src/client/ui/_common_/common.vue b/src/client/ui/_common_/common.vue
index a4d1661f46..e5cdaca235 100644
--- a/src/client/ui/_common_/common.vue
+++ b/src/client/ui/_common_/common.vue
@@ -17,7 +17,7 @@
import { defineAsyncComponent, defineComponent } from 'vue';
import { stream, popup, popups, uploads, pendingApiRequestsCount } from '@/os';
import * as sound from '@/scripts/sound';
-import { $i, $i } from '@/account';
+import { $i } from '@/account';
export default defineComponent({
components: {
diff --git a/src/client/ui/deck.vue b/src/client/ui/deck.vue
index 0cbfd7a48b..6cdf56f3c3 100644
--- a/src/client/ui/deck.vue
+++ b/src/client/ui/deck.vue
@@ -1,5 +1,5 @@
<template>
-<div class="mk-deck" :class="`${deckStore.reactiveState.columnAlign.value}`" v-hotkey.global="keymap" @contextmenu.self.prevent="onContextmenu"
+<div class="mk-deck" :class="`${deckStore.reactiveState.columnAlign.value}`" @contextmenu.self.prevent="onContextmenu"
:style="{ '--deckMargin': deckStore.reactiveState.columnMargin.value + 'px' }"
>
<XSidebar ref="nav"/>
@@ -35,7 +35,6 @@ import { faPlus, faPencilAlt, faChevronLeft, faBars, faCircle } from '@fortaweso
import { } from '@fortawesome/free-regular-svg-icons';
import { v4 as uuid } from 'uuid';
import { host } from '@/config';
-import { search } from '@/scripts/search';
import DeckColumnCore from '@/ui/deck/column-core.vue';
import XSidebar from '@/components/sidebar.vue';
import { getScrollContainer } from '@/scripts/scroll';
@@ -75,14 +74,6 @@ export default defineComponent({
}
return false;
},
- keymap(): any {
- return {
- 'p': this.post,
- 'n': this.post,
- 's': this.search,
- 'h|/': this.help
- };
- },
},
created() {
diff --git a/src/client/ui/default.vue b/src/client/ui/default.vue
index 066b9dd354..1a3c336f39 100644
--- a/src/client/ui/default.vue
+++ b/src/client/ui/default.vue
@@ -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();
},
diff --git a/src/client/ui/desktop.vue b/src/client/ui/desktop.vue
index 7c5824c4c0..199c0fdaaf 100644
--- a/src/client/ui/desktop.vue
+++ b/src/client/ui/desktop.vue
@@ -1,5 +1,5 @@
<template>
-<div class="mk-app" v-hotkey.global="keymap" :class="{ wallpaper }" @contextmenu.prevent="() => {}">
+<div class="mk-app" :class="{ wallpaper }" @contextmenu.prevent="() => {}">
<XSidebar ref="nav" class="sidebar"/>
<XCommon/>
@@ -31,19 +31,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
- };
- },
-
menu(): string[] {
return this.$store.state.menu;
},
diff --git a/src/client/ui/zen.vue b/src/client/ui/zen.vue
index 1c1334bece..c2a307da73 100644
--- a/src/client/ui/zen.vue
+++ b/src/client/ui/zen.vue
@@ -1,5 +1,5 @@
<template>
-<div class="mk-app" v-hotkey.global="keymap">
+<div class="mk-app">
<div class="contents">
<header class="header">
<XHeader :info="pageInfo"/>
@@ -26,11 +26,8 @@ import { defineComponent, defineAsyncComponent } from 'vue';
import { faLayerGroup, faBars, faHome, faCircle } from '@fortawesome/free-solid-svg-icons';
import { faBell } from '@fortawesome/free-regular-svg-icons';
import { host } from '@/config';
-import { search } from '@/scripts/search';
import XHeader from './_common_/header.vue';
import XCommon from './_common_/common.vue';
-import * as os from '@/os';
-import { ColdDeviceStorage } from '@/store';
export default defineComponent({
components: {
@@ -47,21 +44,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
- };
- },
- },
-
watch: {
$route(to, from) {
this.pageKey++;