diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2023-06-01 17:34:56 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2023-06-01 17:34:56 +0900 |
| commit | f6830885d74dffddb75b36d2afb54d0feecaede4 (patch) | |
| tree | 10bf127dfbd8dbbce83379483a0360c3de689cd8 | |
| parent | 13.13.0-beta.7 (diff) | |
| download | misskey-f6830885d74dffddb75b36d2afb54d0feecaede4.tar.gz misskey-f6830885d74dffddb75b36d2afb54d0feecaede4.tar.bz2 misskey-f6830885d74dffddb75b36d2afb54d0feecaede4.zip | |
tweak of cd8274888
| -rw-r--r-- | locales/index.d.ts | 1 | ||||
| -rw-r--r-- | locales/ja-JP.yml | 1 | ||||
| -rw-r--r-- | packages/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 @@ <div class="_gaps_s"> <MkSwitch v-model="showFixedPostForm">{{ i18n.ts.showFixedPostForm }}</MkSwitch> <MkSwitch v-model="showFixedPostFormInChannel">{{ i18n.ts.showFixedPostFormInChannel }}</MkSwitch> + <MkSwitch v-model="showTimelineReplies">{{ i18n.ts.flagShowTimelineReplies }}<template #caption>{{ i18n.ts.flagShowTimelineRepliesDescription }} {{ i18n.ts.reflectMayTakeTime }}</template></MkSwitch> </div> </FormSection> @@ -149,9 +150,11 @@ <div class="_gaps"> <MkFolder> <template #label>{{ i18n.ts.additionalEmojiDictionary }}</template> - <MkButton @click="downloadEmojiIndex('en-US')"><i class="ti ti-download"></i> en-US</MkButton> + <div v-for="lang in emojiIndexLangs" class="_buttons"> + <MkButton @click="downloadEmojiIndex(lang)"><i class="ti ti-download"></i> {{ lang }}{{ defaultStore.reactiveState.additionalUnicodeEmojiIndexes.value[lang] ? ` (${ i18n.ts.installed })` : '' }}</MkButton> + <MkButton v-if="defaultStore.reactiveState.additionalUnicodeEmojiIndexes.value[lang]" danger @click="removeEmojiIndex(lang)"><i class="ti ti-trash"></i> {{ i18n.ts.remove }}</MkButton> + </div> </MkFolder> - <MkSwitch v-model="showTimelineReplies">{{ i18n.ts.flagShowTimelineReplies }}<template #caption>{{ i18n.ts.flagShowTimelineRepliesDescription }} {{ i18n.ts.reflectMayTakeTime }}</template></MkSwitch> <FormLink to="/settings/deck">{{ i18n.ts.deck }}</FormLink> <FormLink to="/settings/custom-css"><template #icon><i class="ti ti-code"></i></template>{{ i18n.ts.customCss }}</FormLink> </div> @@ -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()); |