show the homeserver after lookup
This commit is contained in:
parent
3dbffdb417
commit
c0d3c950b0
3 changed files with 12 additions and 0 deletions
|
@ -49,6 +49,7 @@ export class LoginViewModel extends ViewModel {
|
|||
get startSSOLoginViewModel() { return this._startSSOLoginViewModel; }
|
||||
get completeSSOLoginViewModel(){ return this._completeSSOLoginViewModel; }
|
||||
get homeserver() { return this._homeserver; }
|
||||
get forwardedHomeserver() { return this._loginOptions?.homeserver; }
|
||||
get errorMessage() { return this._errorMessage; }
|
||||
get showHomeserver() { return !this._hideHomeserver; }
|
||||
get loadViewModel() {return this._loadViewModel; }
|
||||
|
@ -203,6 +204,7 @@ export class LoginViewModel extends ViewModel {
|
|||
this._abortQueryOperation = this.track(() => queryOperation.abort());
|
||||
this.emitChange("isFetchingLoginOptions");
|
||||
this._loginOptions = await queryOperation.result;
|
||||
this.emitChange("forwardedHomeserver");
|
||||
}
|
||||
catch (e) {
|
||||
if (e.name === "AbortError") {
|
||||
|
|
|
@ -238,6 +238,12 @@ a.button-action {
|
|||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.LoginView_forwardInfo {
|
||||
font-size: 0.9em;
|
||||
margin-left: 1em;
|
||||
color: #777;
|
||||
}
|
||||
|
||||
.CompleteSSOView_title {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
|
|
@ -46,6 +46,10 @@ export class LoginView extends TemplateView {
|
|||
onInput: event => vm.setHomeserver(event.target.value),
|
||||
onChange: () => vm.queryHomeserver(),
|
||||
}),
|
||||
t.p({className: {
|
||||
LoginView_forwardInfo: true,
|
||||
hidden: vm => !vm.forwardedHomeserver
|
||||
}}, vm => vm.i18n`${vm.homeserver} forwards to ${vm.forwardedHomeserver}.`),
|
||||
t.if(vm => vm.errorMessage, (t, vm) => t.p({className: "error"}, vm.i18n(vm.errorMessage))),
|
||||
]
|
||||
)),
|
||||
|
|
Reference in a new issue