Compare commits

...

5 Commits

Author SHA1 Message Date
Developer 02
d166ae5a8b Merge branch 'master' of http://git.dd:3000/AppStd/EnvelopeGenerator 2024-08-29 15:48:53 +02:00
Developer 02
145d139e3a fix(auth): Aktualisierung der Authentifizierungsstatusbehandlung
- Methode `logInOut` aktualisiert, um nach dem Logout zu `/login` zu navigieren.
- Methoden `login` und `logout` angepasst, um `#IsAuthenticated` basierend auf der Antwort zu aktualisieren.
- Sicherstellung, dass der Authentifizierungsstatus nach Login und Logout korrekt gesetzt wird.
2024-08-29 15:46:20 +02:00
Developer 02
93417d1b37 fix: Den Text des Navbar-Brand von "SignFlow" auf "signFlow" geändert, um eine konsistente Gestaltung zu gewährleisten. 2024-08-23 10:58:54 +02:00
Developer 02
ca3ea36a83 chore: Favicon aktualisieren 2024-08-23 10:57:23 +02:00
Developer 02
c59d9bbf57 chore: Favicon aktualisieren 2024-08-23 10:54:13 +02:00
5 changed files with 14 additions and 4 deletions

View File

@@ -1,7 +1,7 @@
<header>
<nav class="navbar navbar-expand-lg bg-body-tertiary fs-5">
<div class="container-fluid">
<a class="navbar-brand fs-2 fw-bold" [routerLink]="['/']">SignFlow</a>
<a class="navbar-brand fs-2 fw-bold" [routerLink]="['/']">signFlow</a>
<!-- Navbars -->
<div *ngIf="isLogedIn()" class="navbar-collapse collapse d-sm-inline-flex justify-content-center"
[ngClass]="{ show: isExpanded }">

View File

@@ -25,7 +25,7 @@ export class NavbarComponent {
async logInOut(): Promise<void> {
if (this.isLogedIn())
return this.authService.logoutAsync().then(() => {
this.router.navigate(['/']);
this.router.navigate(['/login']);
})
else
this.router.navigate(['/login']);

View File

@@ -15,11 +15,21 @@ export class AuthService {
}
login(credentials: { username: string; password: string }): Observable<any> {
return this.http.post(`${this.url}/login`, credentials);
return this.http.post(`${this.url}/login`, credentials).pipe(
tap({
next: res => this.#IsAuthenticated = true,
error: () => this.#IsAuthenticated = false
})
)
}
logout(): Observable<any> {
return this.http.post(`${this.url}/logout`, {});
return this.http.post(`${this.url}/logout`, {}).pipe(
tap({
next: res => this.#IsAuthenticated = false,
error: () => this.#IsAuthenticated = true
})
);
}
async logoutAsync(): Promise<void> {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 264 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 264 KiB