From 72b315491bfc000a433f7cbd4cbcc6df7fedd5d4 Mon Sep 17 00:00:00 2001 From: nexryai <61890205+nexryai@users.noreply.github.com> Date: Sat, 4 Mar 2023 19:19:55 +0900 Subject: [PATCH] Fix: If mail delivery is disabled on the server, make the settings page indicate this (#10191) Co-authored-by: syuilo <Syuilotan@yahoo.co.jp> --- locales/ja-JP.yml | 1 + packages/frontend/src/pages/settings/email.vue | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index ef70469935..f94133c19f 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -956,6 +956,7 @@ exploreOtherServers: "他のサーバーを探す" letsLookAtTimeline: "タイムラインを見てみる" disableFederationWarn: "連合が無効になっています。無効にしても投稿が非公開にはなりません。ほとんどの場合、このオプションを有効にする必要はありません。" invitationRequiredToRegister: "現在このサーバーは招待制です。招待コードをお持ちの方のみ登録できます。" +emailNotSupported: "このサーバーではメール配信はサポートされていません" postToTheChannel: "チャンネルに投稿" _achievements: diff --git a/packages/frontend/src/pages/settings/email.vue b/packages/frontend/src/pages/settings/email.vue index 1734dcfe42..b1e6f223b6 100644 --- a/packages/frontend/src/pages/settings/email.vue +++ b/packages/frontend/src/pages/settings/email.vue @@ -1,5 +1,5 @@ <template> -<div class="_gaps_m"> +<div v-if="instance.enableEmail" class="_gaps_m"> <FormSection first> <template #label>{{ i18n.ts.emailAddress }}</template> <MkInput v-model="emailAddress" type="email" manual-save> @@ -37,17 +37,22 @@ </div> </FormSection> </div> +<div v-if="!instance.enableEmail" class="_gaps_m"> + <MkInfo>{{ i18n.ts.emailNotSupported }}</MkInfo> +</div> </template> <script lang="ts" setup> import { onMounted, ref, watch } from 'vue'; import FormSection from '@/components/form/section.vue'; +import MkInfo from '@/components/MkInfo.vue'; import MkInput from '@/components/MkInput.vue'; import MkSwitch from '@/components/MkSwitch.vue'; import * as os from '@/os'; import { $i } from '@/account'; import { i18n } from '@/i18n'; import { definePageMetadata } from '@/scripts/page-metadata'; +import { instance } from '@/instance'; const emailAddress = ref($i!.email);