Improved domain autoconfig interaction

This commit is contained in:
the-djmaze 2024-08-21 00:28:36 +02:00
parent 6a1b83b365
commit 113003f485
2 changed files with 8 additions and 1 deletions

View file

@ -148,6 +148,8 @@ export class DomainPopupView extends AbstractViewPopup {
imapHostFocus: false,
sieveHostFocus: false,
smtpHostFocus: false,
detectingConfig: false
});
this.imapDisabled_capabilities = ko.observableArray();
this.imapCapabilities = ko.observableArray();
@ -318,6 +320,7 @@ export class DomainPopupView extends AbstractViewPopup {
}
autoconfig() {
this.detectingConfig(true);
let domain = this.name();
Remote.request('AdminDomainAutoconfig', (iError, oData) => {
if (oData?.Result?.config) {
@ -335,6 +338,7 @@ export class DomainPopupView extends AbstractViewPopup {
this.smtpUseAuth(!!server.authentication);
this.smtpUsePhpMail(false);
}
this.detectingConfig(false);
}, {domain});
}

View file

@ -11,7 +11,10 @@
<input name="Name" type="text" class="span4" autofocus="" autocomplete="off" autocorrect="off" autocapitalize="off"
data-bind="textInput: name">
<div class="alert-error" data-bind="visible: savingError, text: savingError"></div>
<button type="button" data-bind="click: autoconfig">autoconfig</button>
<button class="btn" type="button" data-bind="click: autoconfig">
<i class="fontastic" data-bind="css: {'icon-spinner': detectingConfig()}"></i>
autoconfig
</button>
</div>
<div class="span5 alert-info domain-desc" data-bind="visible: domainDesc, html: domainDesc"></div>
</div>