diff --git a/src/domain/login/LoginViewModel.js b/src/domain/login/LoginViewModel.js index 73547957..d6cd6eed 100644 --- a/src/domain/login/LoginViewModel.js +++ b/src/domain/login/LoginViewModel.js @@ -42,6 +42,7 @@ export class LoginViewModel extends ViewModel { get defaultHomeServer() { return this._homeserver; } get errorMessage() { return this._errorMessage; } get showHomeserver() { return !this._completeSSOLoginViewModel; } + get cancelUrl() { return this.urlCreator.urlForSegment("session"); } async _createViewModels(homeserver) { if (this._loginToken) { diff --git a/src/domain/login/PasswordLoginViewModel.js b/src/domain/login/PasswordLoginViewModel.js index 00707a0a..f53869ec 100644 --- a/src/domain/login/PasswordLoginViewModel.js +++ b/src/domain/login/PasswordLoginViewModel.js @@ -30,7 +30,6 @@ export class PasswordLoginViewModel extends ViewModel { } get loadViewModel() {return this._loadViewModel; } - get cancelUrl() { return this.urlCreator.urlForSegment("session"); } get isBusy() { if (!this._loadViewModel) { diff --git a/src/platform/web/ui/css/login.css b/src/platform/web/ui/css/login.css index 2b65f82c..01b6bc6e 100644 --- a/src/platform/web/ui/css/login.css +++ b/src/platform/web/ui/css/login.css @@ -74,11 +74,12 @@ limitations under the License. .StartSSOLoginView { display: flex; flex-direction: column; + padding: 0 0.4em 0; } .StartSSOLoginView_button { flex: 1; - margin-top: 10px; + margin-top: 12px; } .LoginView_separator { diff --git a/src/platform/web/ui/css/themes/element/theme.css b/src/platform/web/ui/css/themes/element/theme.css index facbefc8..08f1df06 100644 --- a/src/platform/web/ui/css/themes/element/theme.css +++ b/src/platform/web/ui/css/themes/element/theme.css @@ -228,6 +228,11 @@ a.button-action { border-radius: 8px; } +.LoginView_back { + background-image: url("./icons/chevron-left.svg"); + background-color: transparent; +} + .LoginView_separator { font-weight: 500; font-size: 1.5rem; diff --git a/src/platform/web/ui/login/LoginView.js b/src/platform/web/ui/login/LoginView.js index ebcac433..c15d69ba 100644 --- a/src/platform/web/ui/login/LoginView.js +++ b/src/platform/web/ui/login/LoginView.js @@ -30,6 +30,7 @@ export class LoginView extends TemplateView { }); return t.div({className: "PreSessionScreen"}, [ + t.a({className: "button-utility LoginView_back", href: vm.cancelUrl}), t.div({className: "logo"}), t.h1([vm.i18n`Sign In`]), t.mapView(vm => vm.completeSSOLoginViewModel, vm => vm ? new CompleteSSOView(vm) : null), diff --git a/src/platform/web/ui/login/PasswordLoginView.js b/src/platform/web/ui/login/PasswordLoginView.js index b19daa2a..0f330993 100644 --- a/src/platform/web/ui/login/PasswordLoginView.js +++ b/src/platform/web/ui/login/PasswordLoginView.js @@ -45,10 +45,6 @@ export class PasswordLoginView extends TemplateView { t.div({ className: "form-row" }, [t.label({ for: "password" }, vm.i18n`Password`), password]), t.mapView(vm => vm.loadViewModel, loadViewModel => loadViewModel ? new SessionLoadStatusView(loadViewModel) : null), t.div({ className: "button-row" }, [ - t.a({ - className: "button-action secondary", - href: vm.cancelUrl - }, [vm.i18n`Go Back`]), t.button({ className: "button-action primary", type: "submit"