aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/app/components/profile-settings/profile-settings.component.html7
-rw-r--r--src/app/components/profile-settings/profile-settings.component.ts7
2 files changed, 12 insertions, 2 deletions
diff --git a/src/app/components/profile-settings/profile-settings.component.html b/src/app/components/profile-settings/profile-settings.component.html
index fd2d0c5..1471859 100644
--- a/src/app/components/profile-settings/profile-settings.component.html
+++ b/src/app/components/profile-settings/profile-settings.component.html
@@ -116,7 +116,7 @@
</div>
</section>
</section>
- <section class="flex-col margin-top-dot5">
+ <section class="flex-col input-selection">
<div class="flex-row">
<label class="flexible fg-focus">Current Password</label>
@@ -124,7 +124,10 @@
<label *ngIf="updateUserFormGroup.get('password')?.errors?.minlength" class="error">*Minimum 3 characters</label>
<label *ngIf="updateUserFormGroup.get('password')?.errors?.pattern" class="error">*At least 1 number</label>
</div>
- <input type="password" class="fancy-input border-faded-slim border-bottom-only" formControlName="password" required>
+ <input [type]="showCurrentPassword ? 'text' : 'password'" class="fancy-input border-faded-slim border-bottom-only padding-right-1dot5" formControlName="password" required>
+ <button type="button" class="show-password-button hover-half-opacity click-effect" (click)="toggleShowPassword(0)">
+ <img [src]="showCurrentPassword ? '/assets/icons/tabler-icon-eye-off.svg' : '/assets/icons/tabler-icon-eye.svg'">
+ </button>
</section>
<section class="margin-top-bot-dot3">
<app-success-bar></app-success-bar>
diff --git a/src/app/components/profile-settings/profile-settings.component.ts b/src/app/components/profile-settings/profile-settings.component.ts
index 78a57ec..f329942 100644
--- a/src/app/components/profile-settings/profile-settings.component.ts
+++ b/src/app/components/profile-settings/profile-settings.component.ts
@@ -38,6 +38,7 @@ export class ProfileSettingsComponent implements OnInit {
public chosenTechnologies: Technology[];
public availableLanguages: Language[];
public availableTechnologies: Technology[];
+ public showCurrentPassword = false;
constructor(private _titleService: Title, private _router: Router, private _userService: UserService, private _languageService: LanguageService, private _technologyService: TechnologyService, private _tokenService: TokenService, private _fb: FormBuilder, private _location: Location) {
this._titleService.setTitle(this._title);
@@ -346,4 +347,10 @@ export class ProfileSettingsComponent implements OnInit {
this._router.onSameUrlNavigation = 'reload';
this._router.navigate([this._router.url]);
}
+
+ toggleShowPassword(index: number): void {
+ switch (index) {
+ case 0: this.showCurrentPassword = !this.showCurrentPassword;
+ }
+ }
}