Commit c2b78a93 authored by Revant Nandgaonkar's avatar Revant Nandgaonkar

fix: UI and UX Fixes

authorization-server: /v1/user/get_user to return isPasswordSet: boolean
communication-server: update settings DTO fixed
all-clients: Duration increased from 2000ms to 5000ms
all-clients: set UNDO_DURATION 10000ms and DURATION 5000ms constants
identity-client: set password or change password as per isPasswordSet
identity-client: disable delete with message if user is administrator
identity-client: display password requirements on profile component
authorization-client: display password requirements on verify password component
authorization-client: show error for mismatch in repeat password verification

multiple ui ux updates
parent 17ad7f0e
......@@ -69,9 +69,20 @@ export class UserService {
}
async getAuthorizedUser(uuid: string) {
let user = await this.findOne({ uuid });
user = this.getUserWithoutSecrets(user);
return user;
const user = await this.findOne({ uuid });
return {
disabled: user.disabled,
roles: user.roles,
enable2fa: user.enable2fa,
deleted: user.deleted,
enablePasswordLess: user.enablePasswordLess,
email: user.email,
name: user.name,
uuid: user.uuid,
creation: user.creation,
isPasswordSet: user.password ? true : false,
};
}
getUserWithoutSecrets(user: User) {
......
......@@ -23,8 +23,8 @@ export class SettingsController {
@Get('v1/get')
@Roles(ADMINISTRATOR)
@UseGuards(TokenGuard, RoleGuard)
async getSettings() {
return await this.settingsService.find();
getSettings() {
return this.settingsService.find();
}
@Post('v1/update')
......
import { IsUrl, IsNotEmpty } from 'class-validator';
import { IsUrl, IsNotEmpty, IsOptional, IsUUID } from 'class-validator';
import { ApiModelProperty } from '@nestjs/swagger';
export class ServerSettingsDto {
......@@ -23,4 +23,8 @@ export class ServerSettingsDto {
@IsUrl({ allow_underscores: true }, { each: true })
callbackURLs: string[];
@IsUUID()
@IsOptional()
communicationServerSystemEmailAccount: string;
}
......@@ -8,6 +8,7 @@ import {
UNDO,
} from '../../constants/messages';
import { MatSnackBar } from '@angular/material';
import { DURATION, UNDO_DURATION } from '../../constants/common';
@Component({
selector: 'app-auth-settings',
......@@ -102,7 +103,7 @@ export class AuthSettingsComponent implements OnInit {
)
.subscribe({
next: response => {
this.snackBar.open(UPDATE_SUCCESSFUL, CLOSE, { duration: 2000 });
this.snackBar.open(UPDATE_SUCCESSFUL, CLOSE, { duration: DURATION });
},
error: error => {},
});
......@@ -117,7 +118,9 @@ export class AuthSettingsComponent implements OnInit {
)
.subscribe({
next: success => {
this.snackBar.open(UPDATE_SUCCESSFUL, CLOSE, { duration: 2000 });
this.snackBar.open(UPDATE_SUCCESSFUL, CLOSE, {
duration: DURATION,
});
},
error: error => {},
});
......@@ -128,7 +131,9 @@ export class AuthSettingsComponent implements OnInit {
this.flagDeleteUserSessions = true;
this.disableDeleteSessions = true;
this.disableDeleteTokens = true;
const snackBar = this.snackBar.open(DELETING, UNDO, { duration: 10000 });
const snackBar = this.snackBar.open(DELETING, UNDO, {
duration: UNDO_DURATION,
});
snackBar.afterDismissed().subscribe({
next: dismissed => {
......@@ -158,7 +163,9 @@ export class AuthSettingsComponent implements OnInit {
this.flagDeleteUserSessions = true;
this.disableDeleteSessions = true;
this.disableDeleteTokens = true;
const snackBar = this.snackBar.open(DELETING, UNDO, { duration: 10000 });
const snackBar = this.snackBar.open(DELETING, UNDO, {
duration: UNDO_DURATION,
});
snackBar.afterDismissed().subscribe({
next: dismissed => {
......
......@@ -12,7 +12,7 @@ import {
PUBLIC_CLIENT,
BODY_PARAM,
} from '../../constants/messages';
import { NEW_ID } from '../../constants/common';
import { NEW_ID, DURATION } from '../../constants/common';
import { ClientAuthentication } from './client-authentication.enum';
export const CLIENT_LIST_ROUTE = '/client/list';
......@@ -124,11 +124,11 @@ export class ClientComponent implements OnInit {
)
.subscribe({
next: success => {
this.snackBar.open(CLIENT_CREATED, CLOSE, { duration: 2000 });
this.snackBar.open(CLIENT_CREATED, CLOSE, { duration: DURATION });
this.router.navigateByUrl(CLIENT_LIST_ROUTE);
},
error: error =>
this.snackBar.open(CLIENT_ERROR, CLOSE, { duration: 2000 }),
this.snackBar.open(CLIENT_ERROR, CLOSE, { duration: DURATION }),
});
}
......@@ -158,11 +158,11 @@ export class ClientComponent implements OnInit {
)
.subscribe({
next: success => {
this.snackBar.open(CLIENT_UPDATED, CLOSE, { duration: 2000 });
this.snackBar.open(CLIENT_UPDATED, CLOSE, { duration: DURATION });
this.router.navigateByUrl(CLIENT_LIST_ROUTE);
},
error: error =>
this.snackBar.open(CLIENT_ERROR, CLOSE, { duration: 2000 }),
this.snackBar.open(CLIENT_ERROR, CLOSE, { duration: DURATION }),
});
}
......
......@@ -10,7 +10,7 @@ import {
CREATE_ERROR,
UPDATE_ERROR,
} from '../../constants/messages';
import { NEW_ID } from '../../constants/common';
import { NEW_ID, DURATION } from '../../constants/common';
export const ROLE_LIST_ROUTE = '/role/list';
......@@ -52,11 +52,11 @@ export class RoleComponent implements OnInit {
.createRole(this.roleForm.controls.roleName.value)
.subscribe({
next: success => {
this.snackBar.open(CREATE_SUCCESSFUL, CLOSE, { duration: 2000 });
this.snackBar.open(CREATE_SUCCESSFUL, CLOSE, { duration: DURATION });
this.router.navigateByUrl(ROLE_LIST_ROUTE);
},
error: error =>
this.snackBar.open(CREATE_ERROR, CLOSE, { duration: 2000 }),
this.snackBar.open(CREATE_ERROR, CLOSE, { duration: DURATION }),
});
}
......@@ -65,11 +65,11 @@ export class RoleComponent implements OnInit {
.updateRole(this.uuid, this.roleForm.controls.roleName.value)
.subscribe({
next: success => {
this.snackBar.open(UPDATE_SUCCESSFUL, CLOSE, { duration: 2000 });
this.snackBar.open(UPDATE_SUCCESSFUL, CLOSE, { duration: DURATION });
this.router.navigateByUrl(ROLE_LIST_ROUTE);
},
error: error =>
this.snackBar.open(UPDATE_ERROR, CLOSE, { duration: 2000 }),
this.snackBar.open(UPDATE_ERROR, CLOSE, { duration: DURATION }),
});
}
}
import { Component, OnInit } from '@angular/core';
import { ScopeService } from './scope.service';
import { ActivatedRoute, Router } from '@angular/router';
// import { MatSnackBar } from '@angular/material';
import { NEW_ID } from '../../constants/common';
import { NEW_ID, DURATION } from '../../constants/common';
import { FormGroup, FormControl } from '@angular/forms';
import {
CREATE_SUCCESSFUL,
......@@ -67,11 +66,11 @@ export class ScopeComponent implements OnInit {
)
.subscribe({
next: success => {
this.snackBar.open(CREATE_SUCCESSFUL, CLOSE, { duration: 2000 });
this.snackBar.open(CREATE_SUCCESSFUL, CLOSE, { duration: DURATION });
this.router.navigateByUrl(SCOPE_LIST_ROUTE);
},
error: error =>
this.snackBar.open(CREATE_ERROR, CLOSE, { duration: 2000 }),
this.snackBar.open(CREATE_ERROR, CLOSE, { duration: DURATION }),
});
}
......@@ -84,11 +83,11 @@ export class ScopeComponent implements OnInit {
)
.subscribe({
next: success => {
this.snackBar.open(UPDATE_SUCCESSFUL, CLOSE, { duration: 2000 });
this.snackBar.open(UPDATE_SUCCESSFUL, CLOSE, { duration: DURATION });
this.router.navigateByUrl(SCOPE_LIST_ROUTE);
},
error: error =>
this.snackBar.open(UPDATE_ERROR, CLOSE, { duration: 2000 }),
this.snackBar.open(UPDATE_ERROR, CLOSE, { duration: DURATION }),
});
}
......
......@@ -3,7 +3,7 @@ import { FormArray, FormGroup, FormControl } from '@angular/forms';
import { SocialLoginService } from './social-login.service';
import { ActivatedRoute, Router } from '@angular/router';
import { MatSnackBar } from '@angular/material';
import { NEW_ID } from '../../constants/common';
import { NEW_ID, DURATION } from '../../constants/common';
import {
SOCIAL_LOGIN_ERROR,
SOCIAL_LOGIN_UPDATED,
......@@ -152,11 +152,13 @@ export class SocialLoginComponent implements OnInit {
)
.subscribe({
next: success => {
this.snackBar.open(SOCIAL_LOGIN_CREATED, CLOSE, { duration: 2000 });
this.snackBar.open(SOCIAL_LOGIN_CREATED, CLOSE, {
duration: DURATION,
});
this.router.navigateByUrl(SOCIAL_LOGIN_LIST_ROUTE);
},
error: error =>
this.snackBar.open(SOCIAL_LOGIN_ERROR, CLOSE, { duration: 2000 }),
this.snackBar.open(SOCIAL_LOGIN_ERROR, CLOSE, { duration: DURATION }),
});
}
......@@ -188,11 +190,13 @@ export class SocialLoginComponent implements OnInit {
)
.subscribe({
next: success => {
this.snackBar.open(SOCIAL_LOGIN_UPDATED, CLOSE, { duration: 2000 });
this.snackBar.open(SOCIAL_LOGIN_UPDATED, CLOSE, {
duration: DURATION,
});
this.router.navigateByUrl(SOCIAL_LOGIN_LIST_ROUTE);
},
error: error =>
this.snackBar.open(UPDATE_ERROR, CLOSE, { duration: 2000 }),
this.snackBar.open(UPDATE_ERROR, CLOSE, { duration: DURATION }),
});
}
}
......@@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core';
import { FormGroup, FormControl } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router';
import { MatSnackBar } from '@angular/material';
import { NEW_ID } from '../../constants/common';
import { NEW_ID, DURATION } from '../../constants/common';
import { UserService } from './user.service';
import {
CREATE_SUCCESSFUL,
......@@ -95,11 +95,11 @@ export class UserComponent implements OnInit {
)
.subscribe({
next: success => {
this.snackBar.open(CREATE_SUCCESSFUL, CLOSE, { duration: 2000 });
this.snackBar.open(CREATE_SUCCESSFUL, CLOSE, { duration: DURATION });
this.router.navigateByUrl(USER_LIST_ROUTE);
},
error: error =>
this.snackBar.open(CREATE_ERROR, CLOSE, { duration: 2000 }),
this.snackBar.open(CREATE_ERROR, CLOSE, { duration: DURATION }),
});
}
......@@ -113,11 +113,11 @@ export class UserComponent implements OnInit {
)
.subscribe({
next: success => {
this.snackBar.open(UPDATE_SUCCESSFUL, CLOSE, { duration: 2000 });
this.snackBar.open(UPDATE_SUCCESSFUL, CLOSE, { duration: DURATION });
this.router.navigateByUrl(USER_LIST_ROUTE);
},
error: error =>
this.snackBar.open(UPDATE_ERROR, CLOSE, { duration: 2000 }),
this.snackBar.open(UPDATE_ERROR, CLOSE, { duration: DURATION }),
});
}
......
......@@ -3,7 +3,7 @@ import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { Router, ActivatedRoute, NavigationEnd } from '@angular/router';
import { filter } from 'rxjs/operators';
import { CloudStorageService } from './cloud-storage.service';
import { NEW_ID } from '../../constants/common';
import { NEW_ID, DURATION } from '../../constants/common';
import { MatSnackBar } from '@angular/material';
import {
UPDATE_SUCCESSFUL,
......@@ -89,11 +89,11 @@ export class CloudStorageComponent implements OnInit {
)
.subscribe({
next: success => {
this.snackBar.open(UPDATE_SUCCESSFUL, CLOSE, { duration: 2000 });
this.snackBar.open(UPDATE_SUCCESSFUL, CLOSE, { duration: DURATION });
this.router.navigateByUrl(STORAGE_LIST_ROUTE);
},
error: error =>
this.snackBar.open(UPDATE_ERROR, CLOSE, { duration: 2000 }),
this.snackBar.open(UPDATE_ERROR, CLOSE, { duration: DURATION }),
});
}
......@@ -110,11 +110,11 @@ export class CloudStorageComponent implements OnInit {
)
.subscribe({
next: success => {
this.snackBar.open(CREATE_SUCCESSFUL, CLOSE, { duration: 2000 });
this.snackBar.open(CREATE_SUCCESSFUL, CLOSE, { duration: DURATION });
this.router.navigateByUrl(STORAGE_LIST_ROUTE);
},
error: error =>
this.snackBar.open(CREATE_ERROR, CLOSE, { duration: 2000 }),
this.snackBar.open(CREATE_ERROR, CLOSE, { duration: DURATION }),
});
}
......
......@@ -2,7 +2,8 @@ import { Component, OnInit } from '@angular/core';
import { CommunicationSettingsService } from './communication-settings.service';
import { MatSnackBar } from '@angular/material';
import { FormGroup, FormControl } from '@angular/forms';
import { UPDATE_SUCCESSFUL, CLOSE } from 'src/app/constants/messages';
import { UPDATE_SUCCESSFUL, CLOSE } from '../../constants/messages';
import { DURATION } from '../../constants/common';
export interface EmailAccount {
host: string;
......@@ -84,7 +85,7 @@ export class CommunicationSettingsComponent implements OnInit {
)
.subscribe({
next: response => {
this.snackBar.open(UPDATE_SUCCESSFUL, CLOSE, { duration: 2000 });
this.snackBar.open(UPDATE_SUCCESSFUL, CLOSE, { duration: DURATION });
},
error: error => {},
});
......
......@@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { EmailService } from './email.service';
import { MatSnackBar } from '@angular/material';
import { NEW_ID } from '../../constants/common';
import { NEW_ID, DURATION } from '../../constants/common';
import { FormGroup, FormControl, Validators } from '@angular/forms';
import {
CREATE_SUCCESSFUL,
......@@ -83,11 +83,11 @@ export class EmailComponent implements OnInit {
)
.subscribe({
next: success => {
this.snackBar.open(CREATE_SUCCESSFUL, CLOSE, { duration: 2000 });
this.snackBar.open(CREATE_SUCCESSFUL, CLOSE, { duration: DURATION });
this.router.navigateByUrl(EMAIL_LIST_ROUTE);
},
error: error =>
this.snackBar.open(CREATE_ERROR, CLOSE, { duration: 2000 }),
this.snackBar.open(CREATE_ERROR, CLOSE, { duration: DURATION }),
});
}
......@@ -104,11 +104,11 @@ export class EmailComponent implements OnInit {
)
.subscribe({
next: success => {
this.snackBar.open(UPDATE_SUCCESSFUL, CLOSE, { duration: 2000 });
this.snackBar.open(UPDATE_SUCCESSFUL, CLOSE, { duration: DURATION });
this.router.navigateByUrl(EMAIL_LIST_ROUTE);
},
error: error =>
this.snackBar.open(UPDATE_ERROR, CLOSE, { duration: 2000 }),
this.snackBar.open(UPDATE_ERROR, CLOSE, { duration: DURATION }),
});
}
}
......@@ -9,8 +9,8 @@ import {
CREATE_ERROR,
UPDATE_SUCCESSFUL,
UPDATE_ERROR,
} from 'src/app/constants/messages';
import { NEW_ID } from 'src/app/constants/common';
} from '../../constants/messages';
import { NEW_ID, DURATION } from '../../constants/common';
export const OAUTH2_PROVIDER_LIST_ROUTE = '/oauth2_provider/list';
......@@ -73,11 +73,11 @@ export class OAuth2ProviderComponent implements OnInit {
)
.subscribe({
next: response => {
this.snackBar.open(CREATE_SUCCESSFUL, CLOSE, { duration: 2000 });
this.snackBar.open(CREATE_SUCCESSFUL, CLOSE, { duration: DURATION });
this.router.navigateByUrl(OAUTH2_PROVIDER_LIST_ROUTE);
},
error: error => {
this.snackBar.open(CREATE_ERROR, CLOSE, { duration: 2000 });
this.snackBar.open(CREATE_ERROR, CLOSE, { duration: DURATION });
},
});
}
......@@ -99,11 +99,11 @@ export class OAuth2ProviderComponent implements OnInit {
)
.subscribe({
next: response => {
this.snackBar.open(UPDATE_SUCCESSFUL, CLOSE, { duration: 2000 });
this.snackBar.open(UPDATE_SUCCESSFUL, CLOSE, { duration: DURATION });
this.router.navigateByUrl(OAUTH2_PROVIDER_LIST_ROUTE);
},
error: error => {
this.snackBar.open(UPDATE_ERROR, CLOSE, { duration: 2000 });
this.snackBar.open(UPDATE_ERROR, CLOSE, { duration: DURATION });
},
});
}
......
......@@ -2,7 +2,7 @@ import { Injectable } from '@angular/core';
import { OAuthService } from 'angular-oauth2-oidc';
import { HttpHeaders, HttpClient } from '@angular/common/http';
import { StorageService } from '../../common/services/storage/storage.service';
import { COMMUNICATION_SERVER } from 'src/app/constants/storage';
import { COMMUNICATION_SERVER } from '../../constants/storage';
@Injectable({
providedIn: 'root',
......
......@@ -5,3 +5,5 @@ export const MODELS = [
{ route: 'user' },
{ route: 'scope' },
];
export const DURATION = 5000;
export const UNDO_DURATION = 10000;
......@@ -2,7 +2,8 @@ import { Component, OnInit } from '@angular/core';
import { FormGroup, FormControl } from '@angular/forms';
import { IdpSettingsService } from './idp-settings.service';
import { MatSnackBar } from '@angular/material';
import { UPDATE_SUCCESSFUL, CLOSE } from 'src/app/constants/messages';
import { UPDATE_SUCCESSFUL, CLOSE } from '../../constants/messages';
import { DURATION } from '../../constants/common';
export interface CloudStorage {
name: string;
......@@ -71,7 +72,7 @@ export class IdpSettingsComponent implements OnInit {
)
.subscribe({
next: response => {
this.snackBar.open(UPDATE_SUCCESSFUL, CLOSE, { duration: 2000 });
this.snackBar.open(UPDATE_SUCCESSFUL, CLOSE, { duration: DURATION });
},
error: error => {},
});
......
......@@ -3,6 +3,7 @@ import { FormGroup, FormControl } from '@angular/forms';
import { MatSnackBar } from '@angular/material';
import { InfrastructureSettingsService } from './infrastructure-settings.service';
import { UPDATE_SUCCESSFUL, CLOSE } from '../../constants/messages';
import { DURATION } from '../../constants/common';
@Component({
selector: 'app-infrastructure-settings',
......@@ -51,7 +52,7 @@ export class InfrastructureSettingsComponent implements OnInit {
)
.subscribe({
next: response => {
this.snackBar.open(UPDATE_SUCCESSFUL, CLOSE, { duration: 2000 });
this.snackBar.open(UPDATE_SUCCESSFUL, CLOSE, { duration: DURATION });
},
error: error => {},
});
......
import { Component, OnInit } from '@angular/core';
import { FormControl, FormGroup } from '@angular/forms';
import { NEW_ID } from '../../constants/common';
import { NEW_ID, DURATION } from '../../constants/common';
import { Router, ActivatedRoute } from '@angular/router';
import { MatSnackBar } from '@angular/material';
import {
......@@ -55,11 +55,11 @@ export class ServiceTypeComponent implements OnInit {
.createServiceType(this.serviceTypeForm.controls.serviceTypeName.value)
.subscribe({
next: success => {
this.snackBar.open(CREATE_SUCCESSFUL, CLOSE, { duration: 2000 });
this.snackBar.open(CREATE_SUCCESSFUL, CLOSE, { duration: DURATION });
this.router.navigateByUrl(SERVICE_TYPE_LIST_ROUTE);
},
error: error =>
this.snackBar.open(CREATE_ERROR, CLOSE, { duration: 2000 }),
this.snackBar.open(CREATE_ERROR, CLOSE, { duration: DURATION }),
});
}
......@@ -68,11 +68,11 @@ export class ServiceTypeComponent implements OnInit {
.deleteServiceType(this.serviceTypeForm.controls.serviceTypeName.value)
.subscribe({
next: success => {
this.snackBar.open(DELETE_SUCCESSFUL, CLOSE, { duration: 2000 });
this.snackBar.open(DELETE_SUCCESSFUL, CLOSE, { duration: DURATION });
this.router.navigateByUrl(SERVICE_TYPE_LIST_ROUTE);
},
error: error =>
this.snackBar.open(DELETE_ERROR, CLOSE, { duration: 2000 }),
this.snackBar.open(DELETE_ERROR, CLOSE, { duration: DURATION }),
});
}
}
......@@ -2,13 +2,13 @@ import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { StorageService } from '../../common/services/storage/storage.service';
import { Observable } from 'rxjs';
import { APP_URL } from 'src/app/constants/storage';
import { APP_URL } from '../../constants/storage';
import { catchError } from 'rxjs/operators';
import { FETCH_ERROR } from '../../constants/messages';
import {
HandleError,
HttpErrorHandler,
} from 'src/app/common/services/http-error-handler/http-error-handler.service';
} from '../../common/services/http-error-handler/http-error-handler.service';
import { OAuthService } from 'angular-oauth2-oidc';
@Injectable({
......
......@@ -3,7 +3,7 @@ import { FormGroup, FormControl } from '@angular/forms';
import { ServiceService } from './service.service';
import { ActivatedRoute, Router } from '@angular/router';
import { MatSnackBar } from '@angular/material';
import { NEW_ID } from '../../constants/common';
import { NEW_ID, DURATION } from '../../constants/common';
import { map, debounceTime } from 'rxjs/operators';
import { Observable } from 'rxjs';
import { ListingService } from '../../shared-ui/listing/listing.service';
......@@ -56,7 +56,7 @@ export class ServiceComponent implements OnInit {
this.clientList = response;
},
error: error => {
this.snackBar.open(FETCH_ERROR, CLOSE, { duration: 2000 });
this.snackBar.open(FETCH_ERROR, CLOSE, { duration: DURATION });
},
});
......@@ -74,7 +74,7 @@ export class ServiceComponent implements OnInit {
this.serviceForm.controls.clientId.disable();
},
error: error => {
this.snackBar.open(FETCH_ERROR, CLOSE, { duration: 2000 });
this.snackBar.open(FETCH_ERROR, CLOSE, { duration: DURATION });
},
});
}
......@@ -104,11 +104,11 @@ export class ServiceComponent implements OnInit {
)
.subscribe({
next: success => {
this.snackBar.open(CREATE_SUCCESSFUL, CLOSE, { duration: 2000 });
this.snackBar.open(CREATE_SUCCESSFUL, CLOSE, { duration: DURATION });
this.router.navigateByUrl(SERVICE_LIST_ROUTE);
},
error: error =>
this.snackBar.open(CREATE_ERROR, CLOSE, { duration: 2000 }),
this.snackBar.open(CREATE_ERROR, CLOSE, { duration: DURATION }),
});
}
......@@ -122,11 +122,11 @@ export class ServiceComponent implements OnInit {
)
.subscribe({
next: success => {
this.snackBar.open(UPDATE_SUCCESSFUL, CLOSE, { duration: 2000 });
this.snackBar.open(UPDATE_SUCCESSFUL, CLOSE, { duration: DURATION });
this.router.navigateByUrl(SERVICE_LIST_ROUTE);
},
error: error =>
this.snackBar.open(UPDATE_ERROR, CLOSE, { duration: 2000 }),
this.snackBar.open(UPDATE_ERROR, CLOSE, { duration: DURATION }),
});
}
}
......@@ -15,6 +15,7 @@ import { AVAILABLE_TRANSLATIONS } from '../constants/app-strings';
import { VerifyGeneratePasswordComponent } from './verify-generate-password/verify-generate-password.component';
import { FlexLayoutModule } from '@angular/flex-layout';
import { ChooseAccountComponent } from './choose-account/choose-account.component';
import { PasswordRequirementComponent } from './password-requirement/password-requirement.component';
let lang = navigator.language;
if (!AVAILABLE_TRANSLATIONS.includes(lang)) {
......@@ -29,6 +30,7 @@ if (!AVAILABLE_TRANSLATIONS.includes(lang)) {
AccountComponent,
VerifyGeneratePasswordComponent,
ChooseAccountComponent,
PasswordRequirementComponent,
],
imports: [
BrowserModule,
......
......@@ -10,6 +10,7 @@ import {
PLEASE_CHECK_EMAIL,
CLOSE,
PLEASE_CHECK_USERNAME,
DURATION,
} from '../../constants/app-strings';
import { LoginChoice } from './login-choice';
......@@ -205,11 +206,13 @@ export class LoginComponent implements OnInit {
.forgotPassword(this.loginUserForm.controls.username.value)
.subscribe({
next: success => {
this.snackBar.open(PLEASE_CHECK_EMAIL, CLOSE, { duration: 2000 });