summaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-09-19 02:32:44 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-09-19 02:32:44 +0900
commitfd770b008e3b4a71c83dba71d588f9a6399a771c (patch)
treeb1dda32c142ca2c836d208e68d1b0a8ca27520d5 /src/client
parentAdd new shortcut (diff)
downloadmisskey-fd770b008e3b4a71c83dba71d588f9a6399a771c.tar.gz
misskey-fd770b008e3b4a71c83dba71d588f9a6399a771c.tar.bz2
misskey-fd770b008e3b4a71c83dba71d588f9a6399a771c.zip
Add new shortcut
Diffstat (limited to 'src/client')
-rw-r--r--src/client/app/desktop/views/components/ui.header.notifications.vue10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/client/app/desktop/views/components/ui.header.notifications.vue b/src/client/app/desktop/views/components/ui.header.notifications.vue
index 59a16df9ec..74dcd4111f 100644
--- a/src/client/app/desktop/views/components/ui.header.notifications.vue
+++ b/src/client/app/desktop/views/components/ui.header.notifications.vue
@@ -1,5 +1,5 @@
<template>
-<div class="notifications">
+<div class="notifications" v-hotkey.global="keymap">
<button :data-active="isOpen" @click="toggle" title="%i18n:@title%">
%fa:R bell%<template v-if="hasUnreadNotification">%fa:circle%</template>
</button>
@@ -19,11 +19,19 @@ export default Vue.extend({
isOpen: false
};
},
+
computed: {
hasUnreadNotification(): boolean {
return this.$store.getters.isSignedIn && this.$store.state.i.hasUnreadNotification;
+ },
+
+ keymap(): any {
+ return {
+ 'shift+n': this.toggle
+ };
}
},
+
methods: {
toggle() {
this.isOpen ? this.close() : this.open();