fix: Remove IMAP and SMTP email validation (#4435)

* Remove IMAP and SMTP email validation
* Rename imap_email & smtp_email columns to imap_login & smtp_login respectively.
* Use channel email domain if inbound email domain not present
This commit is contained in:
Aswin Dev P.S
2022-04-11 19:37:20 +05:30
committed by GitHub
parent 3d164271a8
commit 31cdc63e18
17 changed files with 86 additions and 53 deletions

View File

@@ -486,9 +486,9 @@
"LABEL": "Port",
"PLACE_HOLDER": "Port"
},
"EMAIL": {
"LABEL": "Email",
"PLACE_HOLDER": "Email"
"LOGIN": {
"LABEL": "Login",
"PLACE_HOLDER": "Login"
},
"PASSWORD": {
"LABEL": "Password",
@@ -514,9 +514,9 @@
"LABEL": "Port",
"PLACE_HOLDER": "Port"
},
"EMAIL": {
"LABEL": "Email",
"PLACE_HOLDER": "Email"
"LOGIN": {
"LABEL": "Login",
"PLACE_HOLDER": "Login"
},
"PASSWORD": {
"LABEL": "Password",

View File

@@ -34,12 +34,12 @@
@blur="$v.port.$touch"
/>
<woot-input
v-model="email"
:class="{ error: $v.email.$error }"
v-model="login"
:class="{ error: $v.login.$error }"
class="medium-9 columns"
:label="$t('INBOX_MGMT.IMAP.EMAIL.LABEL')"
:placeholder="$t('INBOX_MGMT.IMAP.EMAIL.PLACE_HOLDER')"
@blur="$v.email.$touch"
:label="$t('INBOX_MGMT.IMAP.LOGIN.LABEL')"
:placeholder="$t('INBOX_MGMT.IMAP.LOGIN.PLACE_HOLDER')"
@blur="$v.login.$touch"
/>
<woot-input
v-model="password"
@@ -73,7 +73,7 @@
import { mapGetters } from 'vuex';
import alertMixin from 'shared/mixins/alertMixin';
import SettingsSection from 'dashboard/components/SettingsSection';
import { required, minLength, email } from 'vuelidate/lib/validators';
import { required, minLength } from 'vuelidate/lib/validators';
export default {
components: {
@@ -91,7 +91,7 @@ export default {
isIMAPEnabled: false,
address: '',
port: '',
email: '',
login: '',
password: '',
isSSLEnabled: true,
};
@@ -99,7 +99,7 @@ export default {
validations: {
address: { required },
port: { required, minLength: minLength(2) },
email: { required, email },
login: { required },
password: { required },
},
computed: {
@@ -119,14 +119,14 @@ export default {
imap_enabled,
imap_address,
imap_port,
imap_email,
imap_login,
imap_password,
imap_enable_ssl,
} = this.inbox;
this.isIMAPEnabled = imap_enabled;
this.address = imap_address;
this.port = imap_port;
this.email = imap_email;
this.login = imap_login;
this.password = imap_password;
this.isSSLEnabled = imap_enable_ssl;
},
@@ -140,7 +140,7 @@ export default {
imap_enabled: this.isIMAPEnabled,
imap_address: this.address,
imap_port: this.port,
imap_email: this.email,
imap_login: this.login,
imap_password: this.password,
imap_enable_ssl: this.isSSLEnabled,
imap_inbox_synced_at: this.isIMAPEnabled

View File

@@ -33,12 +33,12 @@
@blur="$v.port.$touch"
/>
<woot-input
v-model="email"
:class="{ error: $v.email.$error }"
v-model="login"
:class="{ error: $v.login.$error }"
class="medium-9 columns"
:label="$t('INBOX_MGMT.SMTP.EMAIL.LABEL')"
:placeholder="$t('INBOX_MGMT.SMTP.EMAIL.PLACE_HOLDER')"
@blur="$v.email.$touch"
:label="$t('INBOX_MGMT.SMTP.LOGIN.LABEL')"
:placeholder="$t('INBOX_MGMT.SMTP.LOGIN.PLACE_HOLDER')"
@blur="$v.login.$touch"
/>
<woot-input
v-model="password"
@@ -91,7 +91,7 @@
import { mapGetters } from 'vuex';
import alertMixin from 'shared/mixins/alertMixin';
import SettingsSection from 'dashboard/components/SettingsSection';
import { required, minLength, email } from 'vuelidate/lib/validators';
import { required, minLength } from 'vuelidate/lib/validators';
import InputRadioGroup from './components/InputRadioGroup';
import SingleSelectDropdown from './components/SingleSelectDropdown';
@@ -113,7 +113,7 @@ export default {
isSMTPEnabled: false,
address: '',
port: '',
email: '',
login: '',
password: '',
domain: '',
ssl: false,
@@ -147,7 +147,7 @@ export default {
required,
minLength: minLength(2),
},
email: { required, email },
login: { required },
password: { required },
domain: { required },
},
@@ -168,7 +168,7 @@ export default {
smtp_enabled,
smtp_address,
smtp_port,
smtp_email,
smtp_login,
smtp_password,
smtp_domain,
smtp_enable_starttls_auto,
@@ -179,7 +179,7 @@ export default {
this.isSMTPEnabled = smtp_enabled;
this.address = smtp_address;
this.port = smtp_port;
this.email = smtp_email;
this.login = smtp_login;
this.password = smtp_password;
this.domain = smtp_domain;
this.starttls = smtp_enable_starttls_auto;
@@ -220,7 +220,7 @@ export default {
smtp_enabled: this.isSMTPEnabled,
smtp_address: this.address,
smtp_port: this.port,
smtp_email: this.email,
smtp_login: this.login,
smtp_password: this.password,
smtp_domain: this.domain,
smtp_enable_ssl_tls: this.ssl,