From cd827488891ff538d480fa2f9821908bed9a6756 Mon Sep 17 00:00:00 2001
From: syuilo <Syuilotan@yahoo.co.jp>
Date: Thu, 1 Jun 2023 17:10:53 +0900
Subject: enhance(frontend): 追加の絵文字用辞書をダウンロードできるように
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Resolve #10921
---
 packages/frontend/src/components/MkAutocomplete.vue | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

(limited to 'packages/frontend/src/components/MkAutocomplete.vue')

diff --git a/packages/frontend/src/components/MkAutocomplete.vue b/packages/frontend/src/components/MkAutocomplete.vue
index 4338a8f8e6..1af998dedd 100644
--- a/packages/frontend/src/components/MkAutocomplete.vue
+++ b/packages/frontend/src/components/MkAutocomplete.vue
@@ -42,7 +42,7 @@ import { acct } from '@/filters/user';
 import * as os from '@/os';
 import { MFM_TAGS } from '@/scripts/mfm-tags';
 import { defaultStore } from '@/store';
-import { emojilist } from '@/scripts/emojilist';
+import { emojilist, getEmojiName } from '@/scripts/emojilist';
 import { i18n } from '@/i18n';
 import { miLocalStorage } from '@/local-storage';
 import { customEmojis } from '@/custom-emojis';
@@ -71,6 +71,19 @@ const emojiDb = computed(() => {
 		url: char2path(x.char),
 	}));
 
+	for (const index of Object.values(defaultStore.state.additionalUnicodeEmojiIndexes)) {
+		for (const [emoji, keywords] of Object.entries(index)) {
+			for (const k of keywords) {
+				unicodeEmojiDB.push({
+					emoji: emoji,
+					name: k,
+					aliasOf: getEmojiName(emoji)!,
+					url: char2path(emoji),
+				});
+			}
+		}
+	}
+
 	unicodeEmojiDB.sort((a, b) => a.name.length - b.name.length);
 	//#endregion
 
-- 
cgit v1.2.3-freya

