From 87ec9c579dacb4ed5e2c6d2ff5cb5b85d732f321 Mon Sep 17 00:00:00 2001 From: lesion Date: Thu, 21 Oct 2021 17:03:01 +0200 Subject: [PATCH] minor --- components/admin/SMTP.vue | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/components/admin/SMTP.vue b/components/admin/SMTP.vue index ac330d52..3f81d630 100644 --- a/components/admin/SMTP.vue +++ b/components/admin/SMTP.vue @@ -9,7 +9,7 @@ @blur="save('admin_email', admin_email )" :label="$t('admin.admin_email')" :rules="$validators.email") - + p {{smtp}} v-text-field(v-model='smtp.host' :label="$t('admin.smtp_hostname')" :rules="[$validators.required('admin.smtp_hostname')]") @@ -34,10 +34,13 @@ import { mapActions, mapState } from 'vuex' export default { data ({ $store }) { const smtp = { host: '', auth: { user: '', pass: '' } } - if ($store.state.settings.smtp && $store.state.settings.smtp.auth) { + console.error($store.state.settings) + if ($store.state.settings.smtp) { smtp.host = $store.state.settings.smtp.host - smtp.auth.user = $store.state.settings.smtp.auth.user - smtp.auth.pass = $store.state.settings.smtp.auth.pass + if ($store.state.settings.smtp.auth) { + smtp.auth.user = $store.state.settings.smtp.auth.user + smtp.auth.pass = $store.state.settings.smtp.auth.pass + } } return { isValid: false,