mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-21 19:53:50 +01:00
fix: 🩹 disable Unicode 15 emojis
https://github.com/jdecked/twemoji/pull/43
This commit is contained in:
parent
d198ede6ec
commit
a6cd9a6367
@ -130,22 +130,13 @@
|
||||
i18n.ts.defaultReaction
|
||||
}}</template>
|
||||
<option value="⭐">
|
||||
<MkEmoji
|
||||
emoji="⭐"
|
||||
style="height: 1.7em"
|
||||
/>
|
||||
<MkEmoji emoji="⭐" style="height: 1.7em" />
|
||||
</option>
|
||||
<option value="👍">
|
||||
<MkEmoji
|
||||
emoji="👍"
|
||||
style="height: 1.7em"
|
||||
/>
|
||||
<MkEmoji emoji="👍" style="height: 1.7em" />
|
||||
</option>
|
||||
<option value="❤️">
|
||||
<MkEmoji
|
||||
emoji="❤️"
|
||||
style="height: 1.7em"
|
||||
/>
|
||||
<MkEmoji emoji="❤️" style="height: 1.7em" />
|
||||
</option>
|
||||
<option value="custom">
|
||||
<FormInput
|
||||
|
@ -38,6 +38,15 @@ function addSkinTone(emoji: string) {
|
||||
return emoji;
|
||||
}
|
||||
|
||||
const unicodeFifteenEmojis = [
|
||||
'🫨', '🩷', '🩵', '🩶',
|
||||
'🫷', '🫸', '🫎', '🫏',
|
||||
'🪽', '🐦⬛', '🪿', '🪼',
|
||||
'🪻', '🫚', '🫛', '🪭',
|
||||
'🪮', '🪇', '🪈', '🪯',
|
||||
'🛜'
|
||||
]
|
||||
|
||||
const newData = {};
|
||||
|
||||
Object.keys(data).forEach((originalCategory) => {
|
||||
@ -46,6 +55,9 @@ Object.keys(data).forEach((originalCategory) => {
|
||||
newData[newCategory] = newData[newCategory] || [];
|
||||
Object.keys(data[originalCategory]).forEach((emojiIndex) => {
|
||||
const emojiObj = { ...data[originalCategory][emojiIndex] };
|
||||
if (unicodeFifteenEmojis.includes(emojiObj.emoji)) {
|
||||
return;
|
||||
}
|
||||
if (emojiObj.skin_tone_support) {
|
||||
emojiObj.emoji = addSkinTone(emojiObj.emoji);
|
||||
}
|
||||
@ -65,12 +77,12 @@ export type UnicodeEmojiDef = {
|
||||
|
||||
export const emojilist: UnicodeEmojiDef[] = Object.keys(newData).reduce((acc, category) => {
|
||||
const categoryItems = newData[category].map((item) => {
|
||||
return {
|
||||
emoji: item.emoji,
|
||||
slug: item.slug,
|
||||
category: item.category,
|
||||
keywords: item.keywords || [],
|
||||
};
|
||||
return {
|
||||
emoji: item.emoji,
|
||||
slug: item.slug,
|
||||
category: item.category,
|
||||
keywords: item.keywords || [],
|
||||
};
|
||||
});
|
||||
return acc.concat(categoryItems);
|
||||
}, []);
|
||||
|
Loading…
Reference in New Issue
Block a user