From 93b2aeb1665ae44e326b5fba90501d4fd16df5ec Mon Sep 17 00:00:00 2001 From: Vitalii Lysak Date: Tue, 13 Sep 2022 11:55:12 +0300 Subject: code cln --- src/views/_sila/Settings/TransferInfo/WarningSmtp.vue | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/views/_sila') diff --git a/src/views/_sila/Settings/TransferInfo/WarningSmtp.vue b/src/views/_sila/Settings/TransferInfo/WarningSmtp.vue index 63d3a75a..f48633b2 100644 --- a/src/views/_sila/Settings/TransferInfo/WarningSmtp.vue +++ b/src/views/_sila/Settings/TransferInfo/WarningSmtp.vue @@ -28,7 +28,7 @@ @@ -41,7 +41,7 @@ id="smtp-password" v-model="form.password" type="password" - :disabled="isNotAdmin" + :disabled="isNotAdmin || !form.auth" /> @@ -136,8 +136,8 @@ export default { password: '', host: '', port: '', - auth: null, - ssl: null, + auth: false, + ssl: false, }, fields: [ { @@ -164,6 +164,12 @@ export default { }, methods: { saveSmtp() { + if (!this.form.auth) { + // eslint-disable-next-line no-unused-vars + const { user, password, ...formWithoutCredits } = this.form; + this.form = formWithoutCredits; + } + this.$store .dispatch('smtpStore/setSmtpSettings', this.form) .then((message) => this.successToast(message)) -- cgit v1.2.3