From f6830885d74dffddb75b36d2afb54d0feecaede4 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 1 Jun 2023 17:34:56 +0900 Subject: [PATCH] tweak of cd8274888 --- locales/index.d.ts | 1 + locales/ja-JP.yml | 1 + .../frontend/src/pages/settings/general.vue | 23 +++++++++++++++---- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/locales/index.d.ts b/locales/index.d.ts index 3bdb37b9dc..7047f42eff 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -1064,6 +1064,7 @@ export interface Locale { "later": string; "goToMisskey": string; "additionalEmojiDictionary": string; + "installed": string; "_initialAccountSetting": { "accountCreated": string; "letsStartAccountSetup": string; diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 40fad285ca..fcba3fb822 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1061,6 +1061,7 @@ changeReactionConfirm: "リアクションを変更しますか?" later: "あとで" goToMisskey: "Misskeyへ" additionalEmojiDictionary: "絵文字の追加辞書" +installed: "インストール済み" _initialAccountSetting: accountCreated: "アカウントの作成が完了しました!" diff --git a/packages/frontend/src/pages/settings/general.vue b/packages/frontend/src/pages/settings/general.vue index 4ac077a5e3..20b36f0fcb 100644 --- a/packages/frontend/src/pages/settings/general.vue +++ b/packages/frontend/src/pages/settings/general.vue @@ -24,6 +24,7 @@
{{ i18n.ts.showFixedPostForm }} {{ i18n.ts.showFixedPostFormInChannel }} + {{ i18n.ts.flagShowTimelineReplies }}
@@ -149,9 +150,11 @@
- en-US +
+ {{ lang }}{{ defaultStore.reactiveState.additionalUnicodeEmojiIndexes.value[lang] ? ` (${ i18n.ts.installed })` : '' }} + {{ i18n.ts.remove }} +
- {{ i18n.ts.flagShowTimelineReplies }} {{ i18n.ts.deck }} {{ i18n.ts.customCss }}
@@ -259,7 +262,9 @@ watch([ await reloadAsk(); }); -async function downloadEmojiIndex(lang: string) { +const emojiIndexLangs = ['en-US']; + +function downloadEmojiIndex(lang: string) { async function main() { const currentIndexes = defaultStore.state.additionalUnicodeEmojiIndexes; function download() { @@ -269,7 +274,17 @@ async function downloadEmojiIndex(lang: string) { } } currentIndexes[lang] = await download(); - defaultStore.set('additionalUnicodeEmojiIndexes', currentIndexes); + await defaultStore.set('additionalUnicodeEmojiIndexes', currentIndexes); + } + + os.promiseDialog(main()); +} + +function removeEmojiIndex(lang: string) { + async function main() { + const currentIndexes = defaultStore.state.additionalUnicodeEmojiIndexes; + delete currentIndexes[lang]; + await defaultStore.set('additionalUnicodeEmojiIndexes', currentIndexes); } os.promiseDialog(main());