From bef2534fa86cc58654c23bbc8d59f9f9e756f762 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 7 Nov 2020 10:43:27 +0900 Subject: 絵文字ピッカーを強化 + 絵文字ピッカーをリアクションピッカーとして使えるように MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolve #5079 Resolve #3219 --- src/client/components/note.vue | 44 ++++++++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 14 deletions(-) (limited to 'src/client/components/note.vue') diff --git a/src/client/components/note.vue b/src/client/components/note.vue index 377496b402..53972d9f6f 100644 --- a/src/client/components/note.vue +++ b/src/client/components/note.vue @@ -498,20 +498,36 @@ export default defineComponent({ react(viaKeyboard = false) { pleaseLogin(); this.blur(); - os.popup(import('@/components/reaction-picker.vue'), { - showFocus: viaKeyboard, - src: this.$refs.reactButton, - }, { - done: reaction => { - if (reaction) { - os.api('notes/reactions/create', { - noteId: this.appearNote.id, - reaction: reaction - }); - } - this.focus(); - }, - }, 'closed'); + if (this.$store.state.device.useFullReactionPicker) { + os.popup(import('@/components/emoji-picker.vue'), { + src: this.$refs.reactButton, + }, { + done: reaction => { + if (reaction) { + os.api('notes/reactions/create', { + noteId: this.appearNote.id, + reaction: reaction + }); + } + this.focus(); + }, + }, 'closed'); + } else { + os.popup(import('@/components/reaction-picker.vue'), { + showFocus: viaKeyboard, + src: this.$refs.reactButton, + }, { + done: reaction => { + if (reaction) { + os.api('notes/reactions/create', { + noteId: this.appearNote.id, + reaction: reaction + }); + } + this.focus(); + }, + }, 'closed'); + } }, reactDirectly(reaction) { -- cgit v1.2.3-freya