allow custom reactions
This commit is contained in:
parent
710891d1f3
commit
3cc6a0b252
2 changed files with 16 additions and 3 deletions
|
@ -64,7 +64,10 @@ const ReactButton = {
|
|||
if (this.filterWord !== '') {
|
||||
const filterWordLowercase = this.filterWord.toLowerCase()
|
||||
let orderedEmojiList = []
|
||||
for (const emoji of this.$store.state.instance.emoji) {
|
||||
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)
|
||||
|
@ -77,7 +80,10 @@ const ReactButton = {
|
|||
}
|
||||
return orderedEmojiList.flat()
|
||||
}
|
||||
return this.$store.state.instance.emoji || []
|
||||
return [
|
||||
...this.$store.state.instance.emoji,
|
||||
...this.$store.state.instance.customEmoji
|
||||
] || []
|
||||
},
|
||||
mergedConfig () {
|
||||
return this.$store.getters.mergedConfig
|
||||
|
|
|
@ -39,7 +39,14 @@
|
|||
:title="emoji.displayText"
|
||||
@click="addReaction($event, emoji.replacement, close, keepReactOpen)"
|
||||
>
|
||||
{{ emoji.replacement }}
|
||||
<img
|
||||
v-if="emoji.imageUrl !== false"
|
||||
:src="emoji.imageUrl"
|
||||
width="30px"
|
||||
>
|
||||
<span v-else>
|
||||
{{ emoji.replacement }}
|
||||
</span>
|
||||
</span>
|
||||
<div class="reaction-bottom-fader" />
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue