mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
Resolve issue #130
This commit is contained in:
parent
637ed9a478
commit
c8678953fe
3 changed files with 137 additions and 241 deletions
|
|
@ -14,18 +14,6 @@
|
|||
max-width: 810px;
|
||||
}
|
||||
|
||||
.modal-body {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
width: 1600px;
|
||||
left: 0;
|
||||
transition: left 500ms ease;
|
||||
}
|
||||
|
||||
&.domain-second-page .modal-body {
|
||||
left: -800px;
|
||||
}
|
||||
|
||||
.domain-desc {
|
||||
color: #666;
|
||||
line-height: 20px;
|
||||
|
|
@ -45,15 +33,16 @@
|
|||
}
|
||||
|
||||
.testing-done {
|
||||
&.imap-header, &.sieve-header, &.smtp-header {
|
||||
color: green;
|
||||
font-weight: bold;
|
||||
}
|
||||
color: green !important;
|
||||
}
|
||||
|
||||
.testing-error {
|
||||
&.imap-header, &.sieve-header, &.smtp-header {
|
||||
color: red;
|
||||
}
|
||||
color: red !important;
|
||||
}
|
||||
|
||||
.tab-content {
|
||||
grid-column-end: 5;
|
||||
border: 1px solid #ddd;
|
||||
padding: 10px;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -80,8 +80,6 @@ class DomainPopupView extends AbstractViewPopup {
|
|||
testingSieveError: value => value || this.testingSieveErrorDesc(''),
|
||||
testingSmtpError: value => value || this.testingSmtpErrorDesc(''),
|
||||
|
||||
page: () => this.sieveSettings(false),
|
||||
|
||||
// smart form improvements
|
||||
imapServerFocus: value =>
|
||||
value && this.name() && !this.imapServer() && this.imapServer(this.name().replace(/[.]?[*][.]?/g, '')),
|
||||
|
|
@ -139,10 +137,7 @@ class DomainPopupView extends AbstractViewPopup {
|
|||
|
||||
decorateKoCommands(this, {
|
||||
createOrAddCommand: self => self.canBeSaved(),
|
||||
testConnectionCommand: self => self.canBeTested(),
|
||||
whiteListCommand: 1,
|
||||
backCommand: 1,
|
||||
sieveCommand: 1
|
||||
testConnectionCommand: self => self.canBeTested()
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -155,8 +150,6 @@ class DomainPopupView extends AbstractViewPopup {
|
|||
}
|
||||
|
||||
testConnectionCommand() {
|
||||
this.page('main');
|
||||
|
||||
this.testingDone(false);
|
||||
this.testingImapError(false);
|
||||
this.testingSieveError(false);
|
||||
|
|
@ -170,24 +163,18 @@ class DomainPopupView extends AbstractViewPopup {
|
|||
this.testingImapError(true);
|
||||
this.testingSieveError(true);
|
||||
this.testingSmtpError(true);
|
||||
this.sieveSettings(false);
|
||||
} else {
|
||||
let bImap = false,
|
||||
bSieve = false;
|
||||
|
||||
this.testingDone(true);
|
||||
this.testingImapError(true !== oData.Result.Imap);
|
||||
this.testingSieveError(true !== oData.Result.Sieve);
|
||||
this.testingSmtpError(true !== oData.Result.Smtp);
|
||||
|
||||
if (this.testingImapError() && oData.Result.Imap) {
|
||||
bImap = true;
|
||||
this.testingImapErrorDesc('');
|
||||
this.testingImapErrorDesc(oData.Result.Imap);
|
||||
}
|
||||
|
||||
if (this.testingSieveError() && oData.Result.Sieve) {
|
||||
bSieve = true;
|
||||
this.testingSieveErrorDesc('');
|
||||
this.testingSieveErrorDesc(oData.Result.Sieve);
|
||||
}
|
||||
|
|
@ -196,33 +183,12 @@ class DomainPopupView extends AbstractViewPopup {
|
|||
this.testingSmtpErrorDesc('');
|
||||
this.testingSmtpErrorDesc(oData.Result.Smtp);
|
||||
}
|
||||
|
||||
if (this.sieveSettings()) {
|
||||
if (!bSieve && bImap) {
|
||||
this.sieveSettings(false);
|
||||
}
|
||||
} else if (bSieve && !bImap) {
|
||||
this.sieveSettings(true);
|
||||
}
|
||||
}
|
||||
},
|
||||
this
|
||||
);
|
||||
}
|
||||
|
||||
whiteListCommand() {
|
||||
this.page('white-list');
|
||||
}
|
||||
|
||||
backCommand() {
|
||||
this.page('main');
|
||||
}
|
||||
|
||||
sieveCommand() {
|
||||
this.sieveSettings(!this.sieveSettings());
|
||||
this.clearTesting();
|
||||
}
|
||||
|
||||
onDomainCreateOrSaveResponse(iError) {
|
||||
this.saving(false);
|
||||
if (iError) {
|
||||
|
|
@ -241,17 +207,9 @@ class DomainPopupView extends AbstractViewPopup {
|
|||
this.testingSmtpError(false);
|
||||
}
|
||||
|
||||
onHide() {
|
||||
this.page('main');
|
||||
this.sieveSettings(false);
|
||||
}
|
||||
|
||||
onShow(oDomain) {
|
||||
this.saving(false);
|
||||
|
||||
this.page('main');
|
||||
this.sieveSettings(false);
|
||||
|
||||
this.clearTesting();
|
||||
|
||||
this.clearForm();
|
||||
|
|
@ -286,8 +244,6 @@ class DomainPopupView extends AbstractViewPopup {
|
|||
getDefaults() {
|
||||
return {
|
||||
savingError: '',
|
||||
page: 'main',
|
||||
sieveSettings: false,
|
||||
|
||||
name: '',
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue