Skip to content

Commit

Permalink
fix: bug with light theme
Browse files Browse the repository at this point in the history
Signed-off-by: Ingo Sternberg <[email protected]>
#230
  • Loading branch information
IngoSternberg committed Jul 8, 2024
1 parent 0c19f43 commit 7072a64
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { CommonModule } from '@angular/common';
import { ChangeDetectionStrategy, Component, signal, ViewEncapsulation } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { Router } from '@angular/router';
import { IxModule } from '@siemens/ix-angular';
import { IxModule, themeSwitcher } from '@siemens/ix-angular';
import { AuthenticationService } from 'common-frontend-models';

@Component({
Expand All @@ -26,9 +26,12 @@ export class LoginPage {
private readonly emailRegExp = /^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;

constructor(
private router: Router,
private authenticationService: AuthenticationService
) {}
private _router: Router,
private _authenticationService: AuthenticationService,
) {
// this site is always in dark mode
themeSwitcher.setTheme('theme-classic-dark');
}


onSubmit() {
Expand All @@ -40,10 +43,10 @@ export class LoginPage {
return;
}

const loginSuccess = this.authenticationService.login(this.email, this.password);
const loginSuccess = this._authenticationService.login(this.email, this.password);
this.loginSuccess.set(loginSuccess);
if(loginSuccess){
this.router.navigate([ '/' ]);
this._router.navigate([ '/' ]);
}

}
Expand Down

0 comments on commit 7072a64

Please sign in to comment.