summaryrefslogtreecommitdiff
path: root/src/client/components/note.vue
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2020-11-14 11:47:30 +0900
committersyuilo <syuilotan@yahoo.co.jp>2020-11-14 11:47:30 +0900
commit9c9cd168ee0c8a9d2528ef2eda6f7de0b8d8da41 (patch)
treec26440edbb46a4de77a31e64dce4a0e504921b54 /src/client/components/note.vue
parentFix #6832 (diff)
downloadsharkey-9c9cd168ee0c8a9d2528ef2eda6f7de0b8d8da41.tar.gz
sharkey-9c9cd168ee0c8a9d2528ef2eda6f7de0b8d8da41.tar.bz2
sharkey-9c9cd168ee0c8a9d2528ef2eda6f7de0b8d8da41.zip
Improve emoji picker
Diffstat (limited to 'src/client/components/note.vue')
-rw-r--r--src/client/components/note.vue44
1 files changed, 14 insertions, 30 deletions
diff --git a/src/client/components/note.vue b/src/client/components/note.vue
index 53972d9f6f..bf89cbf568 100644
--- a/src/client/components/note.vue
+++ b/src/client/components/note.vue
@@ -498,36 +498,20 @@ export default defineComponent({
react(viaKeyboard = false) {
pleaseLogin();
this.blur();
- 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');
- }
+ os.popup(import('@/components/emoji-picker.vue'), {
+ src: this.$refs.reactButton,
+ compact: !this.$store.state.device.useFullReactionPicker
+ }, {
+ done: reaction => {
+ if (reaction) {
+ os.api('notes/reactions/create', {
+ noteId: this.appearNote.id,
+ reaction: reaction
+ });
+ }
+ this.focus();
+ },
+ }, 'closed');
},
reactDirectly(reaction) {