forked from AkkomaGang/akkoma-fe
allow custom reactions
This commit is contained in:
parent
ca5d0bea60
commit
66604e987c
2 changed files with 16 additions and 3 deletions
|
@ -45,7 +45,10 @@ const ReactButton = {
|
||||||
if (this.filterWord !== '') {
|
if (this.filterWord !== '') {
|
||||||
const filterWordLowercase = this.filterWord.toLowerCase()
|
const filterWordLowercase = this.filterWord.toLowerCase()
|
||||||
let orderedEmojiList = []
|
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]
|
if (emoji.replacement === this.filterWord) return [emoji]
|
||||||
|
|
||||||
const indexOfFilterWord = emoji.displayText.toLowerCase().indexOf(filterWordLowercase)
|
const indexOfFilterWord = emoji.displayText.toLowerCase().indexOf(filterWordLowercase)
|
||||||
|
@ -58,7 +61,10 @@ const ReactButton = {
|
||||||
}
|
}
|
||||||
return orderedEmojiList.flat()
|
return orderedEmojiList.flat()
|
||||||
}
|
}
|
||||||
return this.$store.state.instance.emoji || []
|
return [
|
||||||
|
...this.$store.state.instance.emoji,
|
||||||
|
...this.$store.state.instance.customEmoji
|
||||||
|
] || []
|
||||||
},
|
},
|
||||||
mergedConfig () {
|
mergedConfig () {
|
||||||
return this.$store.getters.mergedConfig
|
return this.$store.getters.mergedConfig
|
||||||
|
|
|
@ -34,8 +34,15 @@
|
||||||
:title="emoji.displayText"
|
:title="emoji.displayText"
|
||||||
@click="addReaction($event, emoji.replacement, close)"
|
@click="addReaction($event, emoji.replacement, close)"
|
||||||
>
|
>
|
||||||
|
<img
|
||||||
|
v-if="emoji.imageUrl !== false"
|
||||||
|
:src="emoji.imageUrl"
|
||||||
|
width="30px"
|
||||||
|
>
|
||||||
|
<span v-else>
|
||||||
{{ emoji.replacement }}
|
{{ emoji.replacement }}
|
||||||
</span>
|
</span>
|
||||||
|
</span>
|
||||||
<div class="reaction-bottom-fader" />
|
<div class="reaction-bottom-fader" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in a new issue