better category null handling

This commit is contained in:
tamaina 2023-01-22 17:33:20 +00:00
parent 0d44129ae3
commit 93dd0638ad
2 changed files with 15 additions and 5 deletions

View file

@ -60,7 +60,15 @@
</div>
<div v-once class="group">
<header class="_acrylic">{{ i18n.ts.customEmojis }}</header>
<XSection v-for="category in customEmojiCategories" :key="'custom:' + category" :initial-shown="false" :emojis="computed(() => customEmojis.filter(e => e.category === category).map(e => ':' + e.name + ':'))" @chosen="chosen">{{ category || i18n.ts.other }}</XSection>
<XSection
v-for="category in customEmojiCategories"
:key="`custom:${category}`"
:initial-shown="false"
:emojis="computed(() => customEmojis.filter(e => category === null ? e.category == null || e.category === 'null' : e.category === category).map(e => `:${e.name}:`))"
@chosen="chosen"
>
{{ category || i18n.ts.other }}
</XSection>
</div>
<div v-once class="group">
<header class="_acrylic">{{ i18n.ts.emoji }}</header>