diff --git a/.woodpecker.yml b/.woodpecker.yml
index c882fea9..e4e5e296 100644
--- a/.woodpecker.yml
+++ b/.woodpecker.yml
@@ -3,6 +3,7 @@ pipeline:
when:
event:
- push
+ - pull_request
image: node:16
commands:
- yarn
@@ -13,6 +14,7 @@ pipeline:
when:
event:
- push
+ - pull_request
image: node:16
commands:
- apt update
diff --git a/src/components/react_button/react_button.js b/src/components/react_button/react_button.js
index 7531fbc8..d4d08d6f 100644
--- a/src/components/react_button/react_button.js
+++ b/src/components/react_button/react_button.js
@@ -1,4 +1,5 @@
import Popover from '../popover/popover.vue'
+import EmojiPicker from '../emoji_picker/emoji_picker.vue'
import { library } from '@fortawesome/fontawesome-svg-core'
import { faSmileBeam } from '@fortawesome/free-regular-svg-icons'
@@ -12,10 +13,12 @@ const ReactButton = {
}
},
components: {
- Popover
+ Popover,
+ EmojiPicker
},
methods: {
- addReaction (event, emoji, close) {
+ addReaction (event, close) {
+ const emoji = event.insertion
const existingReaction = this.status.emoji_reactions.find(r => r.name === emoji)
if (existingReaction && existingReaction.me) {
this.$store.dispatch('unreactWithEmoji', { id: this.status.id, emoji })
@@ -32,40 +35,6 @@ const ReactButton = {
}
},
computed: {
- commonEmojis () {
- return [
- { displayText: 'thumbsup', replacement: '👍' },
- { displayText: 'angry', replacement: '😠' },
- { displayText: 'eyes', replacement: '👀' },
- { displayText: 'joy', replacement: '😂' },
- { displayText: 'fire', replacement: '🔥' }
- ]
- },
- emojis () {
- if (this.filterWord !== '') {
- const filterWordLowercase = this.filterWord.toLowerCase()
- let orderedEmojiList = []
- for (const emoji of [
- ...this.$store.state.instance.emoji,
- ...this.$store.state.instance.customEmoji
- ]) {
- if (emoji.replacement === this.filterWord) return [emoji]
-
- const indexOfFilterWord = emoji.displayText.toLowerCase().indexOf(filterWordLowercase)
- if (indexOfFilterWord > -1) {
- if (!Array.isArray(orderedEmojiList[indexOfFilterWord])) {
- orderedEmojiList[indexOfFilterWord] = []
- }
- orderedEmojiList[indexOfFilterWord].push(emoji)
- }
- }
- return orderedEmojiList.flat()
- }
- return [
- ...this.$store.state.instance.emoji,
- ...this.$store.state.instance.customEmoji
- ] || []
- },
mergedConfig () {
return this.$store.getters.mergedConfig
}
diff --git a/src/components/react_button/react_button.vue b/src/components/react_button/react_button.vue
index e5103fb9..cc94f2fa 100644
--- a/src/components/react_button/react_button.vue
+++ b/src/components/react_button/react_button.vue
@@ -9,43 +9,10 @@
@show="focusInput"
>
-
-
-
-
-
- {{ emoji.replacement }}
-
-
-
-
-
- {{ emoji.replacement }}
-
-
-
-
+