diff --git a/ui-ngx/src/app/modules/login/pages/login/create-password.component.ts b/ui-ngx/src/app/modules/login/pages/login/create-password.component.ts index 0f2ec26ad3..f0a6bdd0ff 100644 --- a/ui-ngx/src/app/modules/login/pages/login/create-password.component.ts +++ b/ui-ngx/src/app/modules/login/pages/login/create-password.component.ts @@ -20,6 +20,7 @@ import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { ActivatedRoute } from '@angular/router'; import { UserPasswordPolicy } from '@shared/models/settings.models'; import { passwordsMatchValidator, passwordStrengthValidator } from '@shared/models/password.models'; +import { finalize } from 'rxjs/operators'; @Component({ selector: 'tb-create-password', @@ -60,11 +61,10 @@ export class CreatePasswordComponent { if (this.createPassword.invalid) { this.createPassword.markAllAsTouched(); } else { - this.isLoading = true - this.authService.activate(this.activateToken, this.createPassword.get('newPassword').value, true) - .subscribe({ - error: () => {this.isLoading = false;} - }); + this.isLoading = true; + this.authService.activate(this.activateToken, this.createPassword.get('newPassword').value, true).pipe( + finalize(() => {this.isLoading = false;}) + ).subscribe(() => {}); } } } diff --git a/ui-ngx/src/app/modules/login/pages/login/login.component.html b/ui-ngx/src/app/modules/login/pages/login/login.component.html index f43ff18435..f2878bde27 100644 --- a/ui-ngx/src/app/modules/login/pages/login/login.component.html +++ b/ui-ngx/src/app/modules/login/pages/login/login.component.html @@ -22,9 +22,9 @@
- + - +
@if(oauth2Clients?.length) { @@ -70,7 +70,7 @@ lock -