forked from mystiq/hydrogen-web
Move back-button to login view
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
parent
3af2ae3bdd
commit
5ab405fc30
6 changed files with 9 additions and 6 deletions
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue