mirror of
https://github.com/kokonect-link/cherrypick
synced 2024-11-01 23:55:58 +09:00
Add new shortcut
This commit is contained in:
parent
b0d60ef2c2
commit
fd770b008e
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="notifications">
|
<div class="notifications" v-hotkey.global="keymap">
|
||||||
<button :data-active="isOpen" @click="toggle" title="%i18n:@title%">
|
<button :data-active="isOpen" @click="toggle" title="%i18n:@title%">
|
||||||
%fa:R bell%<template v-if="hasUnreadNotification">%fa:circle%</template>
|
%fa:R bell%<template v-if="hasUnreadNotification">%fa:circle%</template>
|
||||||
</button>
|
</button>
|
||||||
@ -19,11 +19,19 @@ export default Vue.extend({
|
|||||||
isOpen: false
|
isOpen: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
hasUnreadNotification(): boolean {
|
hasUnreadNotification(): boolean {
|
||||||
return this.$store.getters.isSignedIn && this.$store.state.i.hasUnreadNotification;
|
return this.$store.getters.isSignedIn && this.$store.state.i.hasUnreadNotification;
|
||||||
|
},
|
||||||
|
|
||||||
|
keymap(): any {
|
||||||
|
return {
|
||||||
|
'shift+n': this.toggle
|
||||||
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
toggle() {
|
toggle() {
|
||||||
this.isOpen ? this.close() : this.open();
|
this.isOpen ? this.close() : this.open();
|
||||||
|
Loading…
Reference in New Issue
Block a user