+
+
+ login.password-reset
+
+ login.expired-password-reset-message
-
+
+
-
-
+
+
diff --git a/ui-ngx/src/app/modules/login/pages/login/reset-password.component.scss b/ui-ngx/src/app/modules/login/pages/login/reset-password.component.scss
deleted file mode 100644
index cda127d901..0000000000
--- a/ui-ngx/src/app/modules/login/pages/login/reset-password.component.scss
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Copyright © 2016-2025 The Thingsboard Authors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-@import '../../../../../scss/constants';
-
-:host {
- display: flex;
- flex: 1 1 0;
- .tb-reset-password-content {
- background-color: #eee;
- .tb-reset-password-card {
- @media #{$mat-gt-sm} {
- width: 450px !important;
- }
- }
-
- .tb-card-title{
- padding-top: 0;
- padding-bottom: 0;
- }
- }
-}
diff --git a/ui-ngx/src/app/modules/login/pages/login/reset-password.component.ts b/ui-ngx/src/app/modules/login/pages/login/reset-password.component.ts
index 396c0f740d..ab6fc24452 100644
--- a/ui-ngx/src/app/modules/login/pages/login/reset-password.component.ts
+++ b/ui-ngx/src/app/modules/login/pages/login/reset-password.component.ts
@@ -16,7 +16,6 @@
import { Component } from '@angular/core';
import { AuthService } from '@core/auth/auth.service';
-import { PageComponent } from '@shared/components/page.component';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router';
import { UserPasswordPolicy } from '@shared/models/settings.models';
@@ -25,11 +24,12 @@ import { passwordsMatchValidator, passwordStrengthValidator } from '@shared/mode
@Component({
selector: 'tb-reset-password',
templateUrl: './reset-password.component.html',
- styleUrls: ['./reset-password.component.scss']
+ styleUrls: ['./password.component.scss']
})
-export class ResetPasswordComponent extends PageComponent {
+export class ResetPasswordComponent {
isExpiredPassword: boolean;
+ isLoading = false;
resetPassword: FormGroup;
passwordPolicy: UserPasswordPolicy;
@@ -40,7 +40,6 @@ export class ResetPasswordComponent extends PageComponent {
private router: Router,
private authService: AuthService,
private fb: FormBuilder) {
- super();
this.resetToken = this.route.snapshot.queryParams['resetToken'] || '';
this.passwordPolicy = this.route.snapshot.data['passwordPolicy'];
@@ -62,13 +61,13 @@ export class ResetPasswordComponent extends PageComponent {
onResetPassword() {
if (this.resetPassword.invalid) {
- this.resetPassword.markAllAsTouched();
+ this.resetPassword.markAllAsTouched();
} else {
- this.authService.resetPassword(
- this.resetToken,
- this.resetPassword.get('newPassword').value).subscribe(
- () => this.router.navigateByUrl('login')
- );
+ this.isLoading = true;
+ this.authService.resetPassword(this.resetToken, this.resetPassword.get('newPassword').value).subscribe({
+ next: () => this.router.navigateByUrl('login'),
+ error: () => {this.isLoading = false;}
+ });
}
}
}
diff --git a/ui-ngx/src/app/modules/login/pages/login/two-factor-auth-login.component.html b/ui-ngx/src/app/modules/login/pages/login/two-factor-auth-login.component.html
index 5175c01546..dd0ad39e9a 100644
--- a/ui-ngx/src/app/modules/login/pages/login/two-factor-auth-login.component.html
+++ b/ui-ngx/src/app/modules/login/pages/login/two-factor-auth-login.component.html
@@ -41,11 +41,11 @@
{{ providerDescription }}
-
+
-