Improve usability
This commit is contained in:
parent
dba04cc59c
commit
5184a07cf2
4 changed files with 50 additions and 18 deletions
|
@ -40,12 +40,12 @@
|
|||
</div>
|
||||
<footer>
|
||||
<mk-reactions-viewer :note="p" ref="reactionsViewer"/>
|
||||
<button class="replyButton" @click="reply" title="%i18n:@reply%">
|
||||
<button class="replyButton" @click="reply()" title="%i18n:@reply%">
|
||||
<template v-if="p.reply">%fa:reply-all%</template>
|
||||
<template v-else>%fa:reply%</template>
|
||||
<p class="count" v-if="p.repliesCount > 0">{{ p.repliesCount }}</p>
|
||||
</button>
|
||||
<button class="renoteButton" @click="renote" title="%i18n:@renote%">
|
||||
<button class="renoteButton" @click="renote()" title="%i18n:@renote%">
|
||||
%fa:retweet%<p class="count" v-if="p.renoteCount > 0">{{ p.renoteCount }}</p>
|
||||
</button>
|
||||
<button class="reactionButton" :class="{ reacted: p.myReaction != null }" @click="react()" ref="reactButton" title="%i18n:@add-reaction%">
|
||||
|
@ -113,9 +113,9 @@ export default Vue.extend({
|
|||
computed: {
|
||||
keymap(): any {
|
||||
return {
|
||||
'r|left': this.reply,
|
||||
'r|left': () => this.reply(true),
|
||||
'a|plus': () => this.react(true),
|
||||
'q|right': this.renote,
|
||||
'q|right': () => this.renote(true),
|
||||
'up|k|shift+tab': this.focusBefore,
|
||||
'down|j|tab': this.focusAfter,
|
||||
'1': () => this.reactDirectly('like'),
|
||||
|
@ -240,15 +240,17 @@ export default Vue.extend({
|
|||
}
|
||||
},
|
||||
|
||||
reply() {
|
||||
reply(viaKeyboard = false) {
|
||||
(this as any).os.new(MkPostFormWindow, {
|
||||
reply: this.p
|
||||
reply: this.p,
|
||||
animation: !viaKeyboard
|
||||
}).$once('closed', this.focus);
|
||||
},
|
||||
|
||||
renote() {
|
||||
renote(viaKeyboard = false) {
|
||||
(this as any).os.new(MkRenoteFormWindow, {
|
||||
note: this.p
|
||||
note: this.p,
|
||||
animation: !viaKeyboard
|
||||
}).$once('closed', this.focus);
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue