mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-22 19:14:52 +01:00
Convert link to button
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
parent
d47e126370
commit
04806a1425
@ -49,11 +49,15 @@ export class LoginViewModel extends ViewModel {
|
||||
get homeserver() { return this._homeserver; }
|
||||
get errorMessage() { return this._errorMessage; }
|
||||
get showHomeserver() { return !this._hideHomeserver; }
|
||||
get cancelUrl() { return this.urlCreator.urlForSegment("session"); }
|
||||
get loadViewModel() {return this._loadViewModel; }
|
||||
get isBusy() { return this._isBusy; }
|
||||
get isFetchingLoginOptions() { return this._isFetchingLoginOptions; }
|
||||
|
||||
goBack() {
|
||||
const path = this.navigation.pathFrom([this.navigation.segment("session")]);
|
||||
this.navigation.applyPath(path);
|
||||
}
|
||||
|
||||
async _createViewModels(homeserver) {
|
||||
if (this._loginToken) {
|
||||
this._hideHomeserver = true;
|
||||
|
@ -23,8 +23,14 @@ import {spinner} from "../common.js";
|
||||
|
||||
export class LoginView extends TemplateView {
|
||||
render(t, vm) {
|
||||
const disabled = vm => vm.isBusy;
|
||||
|
||||
return t.div({className: "PreSessionScreen"}, [
|
||||
t.a({className: "button-utility LoginView_back", href: vm.cancelUrl}),
|
||||
t.button({
|
||||
className: "button-utility LoginView_back",
|
||||
onClick: () => vm.goBack(),
|
||||
disabled
|
||||
}),
|
||||
t.div({className: "logo"}),
|
||||
t.h1([vm.i18n`Sign In`]),
|
||||
t.mapView(vm => vm.completeSSOLoginViewModel, vm => vm ? new CompleteSSOView(vm) : null),
|
||||
@ -37,7 +43,7 @@ export class LoginView extends TemplateView {
|
||||
type: "text",
|
||||
placeholder: vm.i18n`Your matrix homeserver`,
|
||||
value: vm.homeserver,
|
||||
disabled: vm => vm.isBusy,
|
||||
disabled,
|
||||
onChange: event => vm.updateHomeServer(event.target.value),
|
||||
})
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user