Fix broken about dialog on sign in page

Signed-off-by: Bastian Hofmann <bashofmann@gmail.com>
This commit is contained in:
Bastian Hofmann 2019-09-25 15:05:52 +02:00 committed by Yogi_Wang
parent 08558d37af
commit c0343db0e1
2 changed files with 17 additions and 2 deletions

View File

@ -1,6 +1,6 @@
<clr-main-container>
<global-message [isAppLevel]="true"></global-message>
<navigator></navigator>
<navigator (showPwdChangeModal)="openModal($event)"></navigator>
<search-result></search-result>
<div class="login-wrapper" [ngStyle]="{'background-image': customLoginBgImg? 'url(/images/' + customLoginBgImg + ')': ''}">
<form #signInForm="ngForm" class="login">
@ -45,4 +45,5 @@
</div>
</clr-main-container>
<sign-up #signupDialog (userCreation)="handleUserCreation($event)"></sign-up>
<forgot-password #forgotPwdDialog></forgot-password>
<forgot-password #forgotPwdDialog></forgot-password>
<about-dialog></about-dialog>

View File

@ -29,6 +29,9 @@ import { User } from '../user/user';
import { CookieService, CookieOptions } from 'ngx-cookie';
import { SkinableConfig } from "../skinable-config.service";
import {ModalEvent} from "../base/modal-event";
import {modalEvents} from "../base/modal-events.const";
import {AboutDialogComponent} from "../shared/about-dialog/about-dialog.component";
// Define status flags for signing in states
export const signInStatusNormal = 0;
@ -57,6 +60,7 @@ export class SignInComponent implements AfterViewChecked, OnInit {
@ViewChild('signInForm', {static: true}) currentForm: NgForm;
@ViewChild('signupDialog', {static: false}) signUpDialog: SignUpComponent;
@ViewChild('forgotPwdDialog', {static: false}) forgotPwdDialog: ForgotPasswordComponent;
@ViewChild(AboutDialogComponent, {static: false}) aboutDialog: AboutDialogComponent;
// Status flag
signInStatus: number = signInStatusNormal;
@ -283,6 +287,16 @@ export class SignInComponent implements AfterViewChecked, OnInit {
this.forgotPwdDialog.open();
}
// Open modal dialog
openModal(event: ModalEvent): void {
switch (event.modalName) {
case modalEvents.ABOUT:
this.aboutDialog.open();
break;
default:
break;
}
}
}