summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-09-18 14:30:50 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-09-18 14:30:50 +0900
commit1ac033ff184a82840a584a12bed1e74960619f57 (patch)
tree877a255d2de8f6f272b3032ede6eecd87a673cba
parent8.51.0 (diff)
downloadmisskey-1ac033ff184a82840a584a12bed1e74960619f57.tar.gz
misskey-1ac033ff184a82840a584a12bed1e74960619f57.tar.bz2
misskey-1ac033ff184a82840a584a12bed1e74960619f57.zip
Improve keyboard shortcut
-rw-r--r--src/client/app/desktop/views/components/notes.note.vue19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/client/app/desktop/views/components/notes.note.vue b/src/client/app/desktop/views/components/notes.note.vue
index 18a1ce9e52..e53dbe1215 100644
--- a/src/client/app/desktop/views/components/notes.note.vue
+++ b/src/client/app/desktop/views/components/notes.note.vue
@@ -115,9 +115,19 @@ export default Vue.extend({
return {
'r|left': this.reply,
'a|plus': () => this.react(true),
- 'n|right': this.renote,
+ 'q|n|right': this.renote,
'up|shift+tab': this.focusBefore,
'down|tab': this.focusAfter,
+ '1': () => this.reactDirectly('like'),
+ '2': () => this.reactDirectly('love'),
+ '3': () => this.reactDirectly('laugh'),
+ '4': () => this.reactDirectly('hmm'),
+ '5': () => this.reactDirectly('surprise'),
+ '6': () => this.reactDirectly('congrats'),
+ '7': () => this.reactDirectly('angry'),
+ '8': () => this.reactDirectly('confused'),
+ '9': () => this.reactDirectly('rip'),
+ '0': () => this.reactDirectly('pudding'),
};
},
@@ -252,6 +262,13 @@ export default Vue.extend({
}).$once('closed', this.focus);
},
+ reactDirectly(reaction) {
+ (this as any).api('notes/reactions/create', {
+ noteId: this.p.id,
+ reaction: reaction
+ });
+ },
+
menu() {
(this as any).os.new(MkNoteMenu, {
source: this.$refs.menuButton,