mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-07 16:37:02 +03: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,
|
testingImapError: false,
|
||||||
testingSieveError: false,
|
testingSieveError: false,
|
||||||
testingSmtpError: false,
|
testingSmtpError: false,
|
||||||
testingImapErrorDesc: '',
|
|
||||||
testingSieveErrorDesc: '',
|
|
||||||
testingSmtpErrorDesc: '',
|
|
||||||
|
|
||||||
imapHostFocus: false,
|
imapHostFocus: false,
|
||||||
sieveHostFocus: false,
|
sieveHostFocus: false,
|
||||||
|
|
@ -142,10 +139,6 @@ export class DomainPopupView extends AbstractViewPopup {
|
||||||
});
|
});
|
||||||
|
|
||||||
addSubscribablesTo(this, {
|
addSubscribablesTo(this, {
|
||||||
testingImapError: value => value || this.testingImapErrorDesc(''),
|
|
||||||
testingSieveError: value => value || this.testingSieveErrorDesc(''),
|
|
||||||
testingSmtpError: value => value || this.testingSmtpErrorDesc(''),
|
|
||||||
|
|
||||||
// smart form improvements
|
// smart form improvements
|
||||||
imapHostFocus: value =>
|
imapHostFocus: value =>
|
||||||
value && this.name() && !this.imapHost() && this.imapHost(this.name().replace(/[.]?[*][.]?/g, '')),
|
value && this.name() && !this.imapHost() && this.imapHost(this.name().replace(/[.]?[*][.]?/g, '')),
|
||||||
|
|
@ -226,7 +219,7 @@ export class DomainPopupView extends AbstractViewPopup {
|
||||||
}
|
}
|
||||||
|
|
||||||
testConnectionCommand() {
|
testConnectionCommand() {
|
||||||
this.clearTesting(false);
|
this.clearTesting();
|
||||||
// https://github.com/the-djmaze/snappymail/issues/477
|
// https://github.com/the-djmaze/snappymail/issues/477
|
||||||
AskPopupView.credentials('IMAP', 'GLOBAL/TEST').then(credentials => {
|
AskPopupView.credentials('IMAP', 'GLOBAL/TEST').then(credentials => {
|
||||||
if (credentials) {
|
if (credentials) {
|
||||||
|
|
@ -240,29 +233,14 @@ export class DomainPopupView extends AbstractViewPopup {
|
||||||
(iError, oData) => {
|
(iError, oData) => {
|
||||||
this.testing(false);
|
this.testing(false);
|
||||||
if (iError) {
|
if (iError) {
|
||||||
this.testingImapError(true);
|
this.testingImapError(getNotification(iError));
|
||||||
this.testingSieveError(true);
|
this.testingSieveError(getNotification(iError));
|
||||||
this.testingSmtpError(true);
|
this.testingSmtpError(getNotification(iError));
|
||||||
} else {
|
} else {
|
||||||
this.testingDone(true);
|
this.testingDone(true);
|
||||||
this.testingImapError(true !== oData.Result.Imap);
|
this.testingImapError(true !== oData.Result.Imap ? oData.Result.Imap : false);
|
||||||
this.testingSieveError(true !== oData.Result.Sieve);
|
this.testingSieveError(true !== oData.Result.Sieve ? oData.Result.Sieve : false);
|
||||||
this.testingSmtpError(true !== oData.Result.Smtp);
|
this.testingSmtpError(true !== oData.Result.Smtp ? oData.Result.Smtp : false);
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
params
|
params
|
||||||
|
|
|
||||||
|
|
@ -20,9 +20,10 @@
|
||||||
|
|
||||||
<input type="radio" name="tabs" id="tab-imap" checked>
|
<input type="radio" name="tabs" id="tab-imap" checked>
|
||||||
<label for="tab-imap" role="tab" tabindex="0"
|
<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>
|
>IMAP</label>
|
||||||
<div class="tab-content" role="tabpanel" aria-hidden="false">
|
<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="row">
|
||||||
<div class="span">
|
<div class="span">
|
||||||
<span data-i18n="POPUPS_DOMAIN/LABEL_SERVER"></span>
|
<span data-i18n="POPUPS_DOMAIN/LABEL_SERVER"></span>
|
||||||
|
|
@ -135,9 +136,10 @@
|
||||||
|
|
||||||
<input type="radio" name="tabs" id="tab-smtp">
|
<input type="radio" name="tabs" id="tab-smtp">
|
||||||
<label for="tab-smtp" role="tab" tabindex="0"
|
<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>
|
>SMTP</label>
|
||||||
<div class="tab-content" role="tabpanel" aria-hidden="true">
|
<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 data-bind="visible: !smtpUsePhpMail()">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="span">
|
<div class="span">
|
||||||
|
|
@ -220,11 +222,12 @@
|
||||||
|
|
||||||
<input type="radio" name="tabs" id="tab-sieve">
|
<input type="radio" name="tabs" id="tab-sieve">
|
||||||
<label for="tab-sieve" role="tab" tabindex="0"
|
<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>
|
<i class="icon-filter"></i>
|
||||||
SIEVE
|
SIEVE
|
||||||
</label>
|
</label>
|
||||||
<div class="tab-content" role="tabpanel" aria-hidden="true">
|
<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="row">
|
||||||
<div class="span5" data-bind="component: {
|
<div class="span5" data-bind="component: {
|
||||||
name: 'Checkbox',
|
name: 'Checkbox',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue