better naming

This commit is contained in:
Bruno Windels 2021-08-23 20:09:45 +02:00
parent d31e442c16
commit 65bd892d8f
2 changed files with 4 additions and 4 deletions

View file

@ -49,7 +49,7 @@ export class LoginViewModel extends ViewModel {
get startSSOLoginViewModel() { return this._startSSOLoginViewModel; } get startSSOLoginViewModel() { return this._startSSOLoginViewModel; }
get completeSSOLoginViewModel(){ return this._completeSSOLoginViewModel; } get completeSSOLoginViewModel(){ return this._completeSSOLoginViewModel; }
get homeserver() { return this._homeserver; } get homeserver() { return this._homeserver; }
get forwardedHomeserver() { return this._loginOptions?.homeserver; } get resolvedHomeserver() { return this._loginOptions?.homeserver; }
get errorMessage() { return this._errorMessage; } get errorMessage() { return this._errorMessage; }
get showHomeserver() { return !this._hideHomeserver; } get showHomeserver() { return !this._hideHomeserver; }
get loadViewModel() {return this._loadViewModel; } get loadViewModel() {return this._loadViewModel; }
@ -204,7 +204,7 @@ export class LoginViewModel extends ViewModel {
this._abortQueryOperation = this.track(() => queryOperation.abort()); this._abortQueryOperation = this.track(() => queryOperation.abort());
this.emitChange("isFetchingLoginOptions"); this.emitChange("isFetchingLoginOptions");
this._loginOptions = await queryOperation.result; this._loginOptions = await queryOperation.result;
this.emitChange("forwardedHomeserver"); this.emitChange("resolvedHomeserver");
} }
catch (e) { catch (e) {
if (e.name === "AbortError") { if (e.name === "AbortError") {

View file

@ -48,8 +48,8 @@ export class LoginView extends TemplateView {
}), }),
t.p({className: { t.p({className: {
LoginView_forwardInfo: true, LoginView_forwardInfo: true,
hidden: vm => !vm.forwardedHomeserver hidden: vm => !vm.resolvedHomeserver
}}, vm => vm.i18n`You will connect to ${vm.forwardedHomeserver}.`), }}, vm => vm.i18n`You will connect to ${vm.resolvedHomeserver}.`),
t.if(vm => vm.errorMessage, (t, vm) => t.p({className: "error"}, vm.i18n(vm.errorMessage))), t.if(vm => vm.errorMessage, (t, vm) => t.p({className: "error"}, vm.i18n(vm.errorMessage))),
] ]
)), )),