From f2d55e7f609ea8a0a78501500b5404d4a25539be Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Tue, 19 Feb 2019 03:48:21 +0900 Subject: [PATCH] Fix #4308 (#4310) --- locales/ja-JP.yml | 1 + src/client/app/admin/views/instance.vue | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 492c1eddb9..747b4171b1 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1234,6 +1234,7 @@ admin/views/instance.vue: smtp-secure-info: "STARTTLS使用時はオフにします。" smtp-host: "SMTPホスト" smtp-port: "SMTPポート" + smtp-auth: "SMTP認証を行う" smtp-user: "SMTPユーザー" smtp-pass: "SMTPパスワード" serviceworker-config: "ServiceWorker" diff --git a/src/client/app/admin/views/instance.vue b/src/client/app/admin/views/instance.vue index 36d885b065..ce3ce16f1c 100644 --- a/src/client/app/admin/views/instance.vue +++ b/src/client/app/admin/views/instance.vue @@ -54,9 +54,10 @@ {{ $t('smtp-host') }} {{ $t('smtp-port') }} + {{ $t('smtp-auth') }} - {{ $t('smtp-user') }} - {{ $t('smtp-pass') }} + {{ $t('smtp-user') }} + {{ $t('smtp-pass') }} {{ $t('smtp-secure') }} @@ -188,6 +189,7 @@ export default Vue.extend({ smtpPort: null, smtpUser: null, smtpPass: null, + smtpAuth: false, enableServiceWorker: false, swPublicKey: null, swPrivateKey: null, @@ -236,6 +238,7 @@ export default Vue.extend({ this.smtpPort = meta.smtpPort; this.smtpUser = meta.smtpUser; this.smtpPass = meta.smtpPass; + this.smtpAuth = meta.smtpUser != null && meta.smtpUser !== ''; this.enableServiceWorker = meta.enableServiceWorker; this.swPublicKey = meta.swPublickey; this.swPrivateKey = meta.swPrivateKey; @@ -293,8 +296,8 @@ export default Vue.extend({ smtpSecure: this.smtpSecure, smtpHost: this.smtpHost, smtpPort: parseInt(this.smtpPort, 10), - smtpUser: this.smtpUser, - smtpPass: this.smtpPass, + smtpUser: this.smtpAuth ? this.smtpUser : '', + smtpPass: this.smtpAuth ? this.smtpPass : '', enableServiceWorker: this.enableServiceWorker, swPublicKey: this.swPublicKey, swPrivateKey: this.swPrivateKey