-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Users will now be warned if their tokens are about to expire - Users will be logged out upon token expiration
- Loading branch information
Showing
3 changed files
with
48 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<main> | ||
<app-navigation-bar /> | ||
<p-toast></p-toast> | ||
<router-outlet /> | ||
</main> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,24 @@ | ||
import { Component } from '@angular/core'; | ||
import { Component, OnInit } from '@angular/core'; | ||
import { RouterOutlet } from '@angular/router'; | ||
import { ButtonModule } from 'primeng/button'; | ||
import { PasswordModule } from 'primeng/password'; | ||
import { ToastModule } from 'primeng/toast'; | ||
import { NavigationBarComponent } from './navigation-bar/navigation-bar.component'; | ||
|
||
import { AuthenticationService } from '../_services/authentication.service'; | ||
import { MessageService } from 'primeng/api'; | ||
@Component({ | ||
selector: 'app-root', | ||
standalone: true, | ||
imports: [NavigationBarComponent, RouterOutlet, ButtonModule, PasswordModule], | ||
imports: [NavigationBarComponent, RouterOutlet, ButtonModule, PasswordModule, ToastModule], | ||
providers: [MessageService], | ||
templateUrl: './app.component.html', | ||
styleUrl: './app.component.css', | ||
}) | ||
export class AppComponent { | ||
export class AppComponent implements OnInit { | ||
title = 'frontend'; | ||
|
||
constructor(private authService: AuthenticationService) {} | ||
ngOnInit() { | ||
this.authService.startTokenExpiryCheck(); | ||
} | ||
} |