diff --git a/src/app/app.module.ts b/src/app/app.module.ts index adaff6f920af36be8e48028aa79b54a0606892e0..80dcc1c4991170261a65bfa3ce0fd6f99b1e3fdd 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -57,7 +57,8 @@ import { NotificationService } from './notification.service'; RegisterComponent ], entryComponents: [ - RegisterComponent + RegisterComponent, + PasswordResetComponent ], imports: [ AppRoutingModule, diff --git a/src/app/login-screen/login-screen.component.html b/src/app/login-screen/login-screen.component.html index 13c68389b453b67753c26c070662ec73138d3808..52ae459e1130b08e59b38b3cc20cef2d1e9c0ea3 100644 --- a/src/app/login-screen/login-screen.component.html +++ b/src/app/login-screen/login-screen.component.html @@ -4,6 +4,6 @@ </div> <div fxLayout="row" fxLayoutGap="5px"> <button mat-raised-button color="primary" (click)="openRegisterDialog()">Register</button> - <button mat-raised-button color="primary">Password reset</button> + <button mat-raised-button color="primary" (click)="openPasswordDialog()">Password reset</button> </div> </div> diff --git a/src/app/login-screen/login-screen.component.ts b/src/app/login-screen/login-screen.component.ts index 0f8de2077875ddd5485e0b0caf68226f3c42492b..dae07f2c6550edf6e8060dc19cff9c434f58f634 100644 --- a/src/app/login-screen/login-screen.component.ts +++ b/src/app/login-screen/login-screen.component.ts @@ -1,6 +1,7 @@ import { Component, Inject, NgModule, OnInit } from '@angular/core'; import { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from '@angular/material'; import { RegisterComponent } from '../register/register.component'; +import { PasswordResetComponent } from '../password-reset/password-reset.component'; @Component({ selector: 'app-login-screen', @@ -9,11 +10,17 @@ import { RegisterComponent } from '../register/register.component'; }) export class LoginScreenComponent implements OnInit { - constructor(public registerDialog: MatDialog) { + constructor(public dialog: MatDialog) { } openRegisterDialog(): void { - const registerDialogRef = this.registerDialog.open(RegisterComponent, { + const registerDialogRef = this.dialog.open(RegisterComponent, { + width: '350px' + }); + } + + openPasswordDialog(): void { + const passwordDialogref = this.dialog.open(PasswordResetComponent, { width: '350px' }); }