moved to single project

This commit is contained in:
2021-08-02 16:52:31 +02:00
commit 4f8b3ce8f3
89 changed files with 16070 additions and 0 deletions

View File

@ -0,0 +1,38 @@
import { Component } from '@angular/core';
import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';
import { Observable } from 'rxjs';
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',
styleUrls: ['./navigation.component.css']
})
export class NavigationComponent {
public authenticated: boolean
isHandset$: Observable<boolean> = this.breakpointObserver.observe(Breakpoints.Handset)
.pipe(
map(result => result.matches),
shareReplay()
);
constructor(
private breakpointObserver: BreakpointObserver,
private tokenService: TokenService,
private router: Router) {
this.router.events.subscribe((e: any) => {
if (e instanceof NavigationEnd) {
this.authenticated = this.tokenService.checkAuthenticated()
}
})
}
ngOnInit() {
this.authenticated = this.tokenService.checkAuthenticated()
}
}