mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-01-19 05:09:22 +08:00
Improved visibility Admin Domain Test errors
This commit is contained in:
parent
61899ce092
commit
29beb9b75d
2 changed files with 13 additions and 32 deletions
|
@ -89,9 +89,6 @@ export class DomainPopupView extends AbstractViewPopup {
|
|||
testingImapError: false,
|
||||
testingSieveError: false,
|
||||
testingSmtpError: false,
|
||||
testingImapErrorDesc: '',
|
||||
testingSieveErrorDesc: '',
|
||||
testingSmtpErrorDesc: '',
|
||||
|
||||
imapHostFocus: false,
|
||||
sieveHostFocus: false,
|
||||
|
@ -142,10 +139,6 @@ export class DomainPopupView extends AbstractViewPopup {
|
|||
});
|
||||
|
||||
addSubscribablesTo(this, {
|
||||
testingImapError: value => value || this.testingImapErrorDesc(''),
|
||||
testingSieveError: value => value || this.testingSieveErrorDesc(''),
|
||||
testingSmtpError: value => value || this.testingSmtpErrorDesc(''),
|
||||
|
||||
// smart form improvements
|
||||
imapHostFocus: value =>
|
||||
value && this.name() && !this.imapHost() && this.imapHost(this.name().replace(/[.]?[*][.]?/g, '')),
|
||||
|
@ -226,7 +219,7 @@ export class DomainPopupView extends AbstractViewPopup {
|
|||
}
|
||||
|
||||
testConnectionCommand() {
|
||||
this.clearTesting(false);
|
||||
this.clearTesting();
|
||||
// https://github.com/the-djmaze/snappymail/issues/477
|
||||
AskPopupView.credentials('IMAP', 'GLOBAL/TEST').then(credentials => {
|
||||
if (credentials) {
|
||||
|
@ -240,29 +233,14 @@ export class DomainPopupView extends AbstractViewPopup {
|
|||
(iError, oData) => {
|
||||
this.testing(false);
|
||||
if (iError) {
|
||||
this.testingImapError(true);
|
||||
this.testingSieveError(true);
|
||||
this.testingSmtpError(true);
|
||||
this.testingImapError(getNotification(iError));
|
||||
this.testingSieveError(getNotification(iError));
|
||||
this.testingSmtpError(getNotification(iError));
|
||||
} else {
|
||||
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) {
|
||||
this.testingImapErrorDesc('');
|
||||
this.testingImapErrorDesc(oData.Result.Imap);
|
||||
}
|
||||
|
||||
if (this.testingSieveError() && oData.Result.Sieve) {
|
||||
this.testingSieveErrorDesc('');
|
||||
this.testingSieveErrorDesc(oData.Result.Sieve);
|
||||
}
|
||||
|
||||
if (this.testingSmtpError() && oData.Result.Smtp) {
|
||||
this.testingSmtpErrorDesc('');
|
||||
this.testingSmtpErrorDesc(oData.Result.Smtp);
|
||||
}
|
||||
this.testingImapError(true !== oData.Result.Imap ? oData.Result.Imap : false);
|
||||
this.testingSieveError(true !== oData.Result.Sieve ? oData.Result.Sieve : false);
|
||||
this.testingSmtpError(true !== oData.Result.Smtp ? oData.Result.Smtp : false);
|
||||
}
|
||||
},
|
||||
params
|
||||
|
|
|
@ -20,9 +20,10 @@
|
|||
|
||||
<input type="radio" name="tabs" id="tab-imap" checked>
|
||||
<label for="tab-imap" role="tab" tabindex="0"
|
||||
data-bind="css: { 'testing-done': testingDone, 'testing-error': testingImapError }, tooltipErrorTip: testingImapErrorDesc"
|
||||
data-bind="css: { 'testing-done': testingDone, 'testing-error': testingImapError }"
|
||||
>IMAP</label>
|
||||
<div class="tab-content" role="tabpanel" aria-hidden="false">
|
||||
<div class="alert alert-error" data-bind="visible: testingImapError, text: testingImapError"></div>
|
||||
<div class="row">
|
||||
<div class="span">
|
||||
<span data-i18n="POPUPS_DOMAIN/LABEL_SERVER"></span>
|
||||
|
@ -135,9 +136,10 @@
|
|||
|
||||
<input type="radio" name="tabs" id="tab-smtp">
|
||||
<label for="tab-smtp" role="tab" tabindex="0"
|
||||
data-bind="css: { 'testing-done': testingDone, 'testing-error': testingSmtpError }, tooltipErrorTip: testingSmtpErrorDesc"
|
||||
data-bind="css: { 'testing-done': testingDone, 'testing-error': testingSmtpError }"
|
||||
>SMTP</label>
|
||||
<div class="tab-content" role="tabpanel" aria-hidden="true">
|
||||
<div class="alert alert-error" data-bind="visible: testingSmtpError, text: testingSmtpError"></div>
|
||||
<div data-bind="visible: !smtpUsePhpMail()">
|
||||
<div class="row">
|
||||
<div class="span">
|
||||
|
@ -220,11 +222,12 @@
|
|||
|
||||
<input type="radio" name="tabs" id="tab-sieve">
|
||||
<label for="tab-sieve" role="tab" tabindex="0"
|
||||
data-bind="css: { 'testing-done': testingDone, 'testing-error': testingSieveError }, tooltipErrorTip: testingSieveErrorDesc">
|
||||
data-bind="css: { 'testing-done': testingDone, 'testing-error': testingSieveError }">
|
||||
<i class="icon-filter"></i>
|
||||
SIEVE
|
||||
</label>
|
||||
<div class="tab-content" role="tabpanel" aria-hidden="true">
|
||||
<div class="alert alert-error" data-bind="visible: testingSieveError, text: testingSieveError"></div>
|
||||
<div class="row">
|
||||
<div class="span5" data-bind="component: {
|
||||
name: 'Checkbox',
|
||||
|
|
Loading…
Reference in a new issue