fixed login dialog reporting issues and responsiveness problem

This commit is contained in:
2026-06-20 21:13:03 +00:00
parent e335e257a2
commit 53d932655e
+3 -1
View File
@@ -1,4 +1,4 @@
import { Component, inject } from '@angular/core'; import { ChangeDetectorRef, Component, inject } from '@angular/core';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms'; import { FormsModule } from '@angular/forms';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
@@ -16,6 +16,7 @@ import { AuthService } from '../services/auth.service';
export class LoginComponent { export class LoginComponent {
private auth = inject(AuthService); private auth = inject(AuthService);
private router = inject(Router); private router = inject(Router);
private cdr = inject(ChangeDetectorRef);
username = ''; username = '';
password = ''; password = '';
@@ -42,6 +43,7 @@ export class LoginComponent {
this.error = typeof body === 'string' ? body : 'Login failed. Please try again.'; this.error = typeof body === 'string' ? body : 'Login failed. Please try again.';
} finally { } finally {
this.loading = false; this.loading = false;
this.cdr.detectChanges();
} }
} }
} }