tweak custom emoji handling

Close #9721
This commit is contained in:
syuilo 2023-01-26 15:48:12 +09:00
parent f5d6b84381
commit 452bd6db25
19 changed files with 261 additions and 78 deletions

View file

@ -17,7 +17,7 @@
</ol>
<ol v-else-if="emojis.length > 0" ref="suggests" :class="$style.list">
<li v-for="emoji in emojis" :key="emoji.emoji" :class="$style.item" tabindex="-1" @click="complete(type, emoji.emoji)" @keydown="onKeydown">
<MkEmoji :emoji="emoji.emoji" :class="$style.emoji"/>
<MkCustomEmoji :name="emoji.emoji" :class="$style.emoji"/>
<!-- eslint-disable-next-line vue/no-v-html -->
<span v-if="q" :class="$style.emojiName" v-html="sanitizeHtml(emoji.name.replace(q, `<b>${q}</b>`))"></span>
<span v-else v-text="emoji.name"></span>
@ -112,7 +112,7 @@ const emojiDb = computed(() => {
customEmojiDB.sort((a, b) => a.name.length - b.name.length);
//#endregion
return markRaw([ ...customEmojiDB, ...unicodeEmojiDB ]);
return markRaw([...customEmojiDB, ...unicodeEmojiDB]);
});
export default {