diff --git a/apps/dashboard/src/app/app.component.html b/apps/dashboard/src/app/app.component.html index e373060..ea1c055 100644 --- a/apps/dashboard/src/app/app.component.html +++ b/apps/dashboard/src/app/app.component.html @@ -1,18 +1,20 @@ -
- -
+
+
+ +
-
Admin Dashboard
- - - @if (isLoggedIn$ | async) { - You are authenticated so you can see this content. - } @else { - - } \ No newline at end of file +
Admin Dashboard
+ + + @if (isLoggedIn$ | async) { + You are authenticated so you can see this content. + } @else { + + } +
\ No newline at end of file diff --git a/apps/login/src/app/remote-entry/entry.component.html b/apps/login/src/app/remote-entry/entry.component.html index 811cb01..9ebf677 100644 --- a/apps/login/src/app/remote-entry/entry.component.html +++ b/apps/login/src/app/remote-entry/entry.component.html @@ -39,4 +39,13 @@ > User is not logged in! + +
+ +
diff --git a/apps/login/src/app/remote-entry/entry.component.ts b/apps/login/src/app/remote-entry/entry.component.ts index a2d894c..be1c859 100644 --- a/apps/login/src/app/remote-entry/entry.component.ts +++ b/apps/login/src/app/remote-entry/entry.component.ts @@ -1,8 +1,9 @@ -import { Component } from '@angular/core'; +import { Component, OnInit } from '@angular/core'; import { CommonModule } from '@angular/common'; import { FormsModule } from '@angular/forms'; import { UserService } from '@ng-mf/data-access-user'; import { ChatBotComponent } from 'login/chatBot'; +import { DarkModeService } from '@ng-mf/dark-mode'; @Component({ imports: [CommonModule, FormsModule, ChatBotComponent], @@ -13,7 +14,7 @@ import { ChatBotComponent } from 'login/chatBot'; /** * This component is the entry point for the remote login application. */ -export class RemoteEntryComponent { +export class RemoteEntryComponent implements OnInit { username = ''; password = ''; isLoggedIn$; @@ -23,14 +24,29 @@ export class RemoteEntryComponent { * * @param userService */ - constructor(private userService: UserService) { + constructor(private userService: UserService, private darkModeService: DarkModeService) { this.isLoggedIn$ = this.userService.isUserLoggedIn$; } + /** + * Lifecycle hook that runs when the component is initialized. + */ + ngOnInit(): void { + // Load the dark mode preference from local storage + this.darkModeService.loadDarkModePreference(); + } + /** * Method to log in the user. */ login() { this.userService.checkCredentials(this.username, this.password); } + + /** + * This method is used to toggle the dark mode + */ + toggleDarkMode(): void { + this.darkModeService.toggleDarkMode(); + } } diff --git a/apps/login/tailwind.config.js b/apps/login/tailwind.config.js index deeec40..a5c359b 100644 --- a/apps/login/tailwind.config.js +++ b/apps/login/tailwind.config.js @@ -1,4 +1,3 @@ -import { Config } from 'tailwindcss'; import { createGlobPatternsForDependencies } from '@nx/angular/tailwind'; import { join } from 'path';