expiry display, not yet working

This commit is contained in:
2021-09-03 20:13:45 +02:00
parent 2312f21d77
commit 657d85538e
3 changed files with 27 additions and 2 deletions

View File

@ -28,6 +28,7 @@
</button>
<span>Nober Grundbesitz GbR Hausverwaltung</span>
<span class="spacer"></span>
<span class="gittagversion">Expires in: {{expiresIn}} seconds</span>
<span class="gittagversion">GITTAGVERSION</span>
<a *ngIf="!authenticated" mat-button routerLink="/login">Login</a>
<a *ngIf="authenticated" mat-button routerLink="/logout">Logout</a>

View File

@ -5,6 +5,8 @@ import { map, shareReplay } from 'rxjs/operators';
import { TokenService } from '../token.service';
import { NavigationEnd, Router } from '@angular/router';
@Component({
selector: 'app-navigation',
templateUrl: './navigation.component.html',
@ -13,6 +15,7 @@ import { NavigationEnd, Router } from '@angular/router';
export class NavigationComponent {
public authenticated: boolean
expiresIn: number
isHandset$: Observable<boolean> = this.breakpointObserver.observe(Breakpoints.Handset)
.pipe(
@ -33,6 +36,7 @@ export class NavigationComponent {
ngOnInit() {
this.authenticated = this.tokenService.checkAuthenticated()
this.expiresIn = 600
}
}