mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-14 14:07:38 -07:00
Improve keyboard shortcut
This commit is contained in:
parent
8b63d22bc0
commit
2c4150c486
1 changed files with 18 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue