mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-19 15:17:43 +01:00
Merge pull request #9581 from bashofmann/fix-about-dialog
Fix broken about dialog on sign in page
This commit is contained in:
commit
cfff0b6aaa
@ -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>
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user