summaryrefslogtreecommitdiff
path: root/src/client/app/desktop/views/components/notes.note.vue
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-09-18 14:50:13 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-09-18 14:50:13 +0900
commit5184a07cf2ba3e5faa703e2f0cfcf465187585ea (patch)
treed2460af9a7e998e8bcdb5a06b6037ab11bca9123 /src/client/app/desktop/views/components/notes.note.vue
parentImprove keyboard shortcuts (diff)
downloadmisskey-5184a07cf2ba3e5faa703e2f0cfcf465187585ea.tar.gz
misskey-5184a07cf2ba3e5faa703e2f0cfcf465187585ea.tar.bz2
misskey-5184a07cf2ba3e5faa703e2f0cfcf465187585ea.zip
Improve usability
Diffstat (limited to 'src/client/app/desktop/views/components/notes.note.vue')
-rw-r--r--src/client/app/desktop/views/components/notes.note.vue18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/client/app/desktop/views/components/notes.note.vue b/src/client/app/desktop/views/components/notes.note.vue
index d60bce2545..bffa6affc9 100644
--- a/src/client/app/desktop/views/components/notes.note.vue
+++ b/src/client/app/desktop/views/components/notes.note.vue
@@ -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);
},