This commit is contained in:
lesion 2021-10-21 17:03:01 +02:00
parent c9bf3af29e
commit 87ec9c579d
No known key found for this signature in database
GPG key ID: 352918250B012177

View file

@ -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,