diff --git a/src/domain/login/LoginViewModel.js b/src/domain/login/LoginViewModel.js index 76876a9b..73547957 100644 --- a/src/domain/login/LoginViewModel.js +++ b/src/domain/login/LoginViewModel.js @@ -41,6 +41,7 @@ export class LoginViewModel extends ViewModel { get completeSSOLoginViewModel(){ return this._completeSSOLoginViewModel; } get defaultHomeServer() { return this._homeserver; } get errorMessage() { return this._errorMessage; } + get showHomeserver() { return !this._completeSSOLoginViewModel; } async _createViewModels(homeserver) { if (this._loginToken) { diff --git a/src/platform/web/ui/login/LoginView.js b/src/platform/web/ui/login/LoginView.js index f260314d..ebcac433 100644 --- a/src/platform/web/ui/login/LoginView.js +++ b/src/platform/web/ui/login/LoginView.js @@ -33,7 +33,7 @@ export class LoginView extends TemplateView { t.div({className: "logo"}), t.h1([vm.i18n`Sign In`]), t.mapView(vm => vm.completeSSOLoginViewModel, vm => vm ? new CompleteSSOView(vm) : null), - t.if(vm => !vm.completeSSOLoginViewModel, + t.if(vm => vm.showHomeserver, (t, vm) => t.div({ className: "LoginView_sso form form-row" }, [t.label({ for: "homeserver" }, vm.i18n`Homeserver`), homeserver])), t.mapView(vm => vm.passwordLoginViewModel, vm => vm ? new PasswordLoginView(vm): null), t.if(vm => vm.passwordLoginViewModel && vm.startSSOLoginViewModel, t => t.p({className: "LoginView_separator"}, vm.i18n`or`)),