parent
5258149a34
commit
5492eca117
@ -148,15 +148,11 @@ export class LogInPage extends LiteElement {
|
|||||||
this.formStateService.stop();
|
this.formStateService.stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
updated(changedProperties: any) {
|
async updated(changedProperties: any) {
|
||||||
if (changedProperties.has("viewState")) {
|
if (changedProperties.get("viewState")) {
|
||||||
const route = this.viewState.route;
|
await this.updateComplete;
|
||||||
|
|
||||||
if (route === "login") {
|
this.syncFormStateView();
|
||||||
this.formStateService.send("SHOW_SIGN_IN_WITH_PASSWORD");
|
|
||||||
} else if (route === "forgotPassword") {
|
|
||||||
this.formStateService.send("SHOW_FORGOT_PASSWORD");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -210,6 +206,16 @@ export class LogInPage extends LiteElement {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private syncFormStateView() {
|
||||||
|
const route = this.viewState.route;
|
||||||
|
|
||||||
|
if (route === "login") {
|
||||||
|
this.formStateService.send("SHOW_SIGN_IN_WITH_PASSWORD");
|
||||||
|
} else if (route === "forgotPassword") {
|
||||||
|
this.formStateService.send("SHOW_FORGOT_PASSWORD");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private renderLoginForm() {
|
private renderLoginForm() {
|
||||||
let formError;
|
let formError;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user