Skip to content

Commit

Permalink
Hide password when login in #10788
Browse files Browse the repository at this point in the history
  • Loading branch information
PowerKiKi committed Oct 9, 2024
1 parent 31bbc57 commit 1f3c8e9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion client/app/login/login.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
(keydown.enter)="maybeConfirm()"
/>
<button mat-icon-button matIconSuffix (click)="hidePassword = !hidePassword">
<mat-icon [naturalIcon]="hidePassword ? 'visibility' : 'visibility_off'" />
<mat-icon [fontIcon]="hidePassword ? 'visibility' : 'visibility_off'" />
</button>

@if (form.controls.password.hasError('required')) {
Expand Down
6 changes: 3 additions & 3 deletions client/app/login/login.component.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {Component, OnInit, inject} from '@angular/core';
import {Component, inject, OnInit} from '@angular/core';
import {ActivatedRoute, Router, RouterLink} from '@angular/router';
import {MatSnackBar} from '@angular/material/snack-bar';
import {ifValid, NaturalIconDirective} from '@ecodev/natural';
import {ifValid} from '@ecodev/natural';
import {UserService} from '../admin/users/services/user.service';
import {finalize} from 'rxjs/operators';
import {FormsModule, NonNullableFormBuilder, ReactiveFormsModule, Validators} from '@angular/forms';
Expand All @@ -23,7 +23,6 @@ import {MatFormFieldModule} from '@angular/material/form-field';
MatInputModule,
MatButtonModule,
MatIconModule,
NaturalIconDirective,
RouterLink,
MatDividerModule,
],
Expand Down Expand Up @@ -67,6 +66,7 @@ export class LoginComponent implements OnInit {
private login(): void {
this.snackBar.dismiss();
this.form.disable();
this.hidePassword = true;

this.userService
.login(this.form.getRawValue())
Expand Down

0 comments on commit 1f3c8e9

Please sign in to comment.