|
|
@ -2,6 +2,8 @@ import { Component, Renderer2 } from '@angular/core';
|
|
|
|
import { ColorThemeService } from './services/colorTheme.service';
|
|
|
|
import { ColorThemeService } from './services/colorTheme.service';
|
|
|
|
import { AuthService } from './services/auth.service';
|
|
|
|
import { AuthService } from './services/auth.service';
|
|
|
|
import { Router } from '@angular/router';
|
|
|
|
import { Router } from '@angular/router';
|
|
|
|
|
|
|
|
import { ViewChild } from '@angular/core';
|
|
|
|
|
|
|
|
import { MatSidenav } from '@angular/material/sidenav';
|
|
|
|
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
@Component({
|
|
|
|
selector: 'app-root',
|
|
|
|
selector: 'app-root',
|
|
|
@ -13,6 +15,8 @@ export class AppComponent {
|
|
|
|
darkThemeIsActive: boolean = false;
|
|
|
|
darkThemeIsActive: boolean = false;
|
|
|
|
loggedIn = false;
|
|
|
|
loggedIn = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ViewChild('sidenav') public sideNav:MatSidenav;
|
|
|
|
|
|
|
|
|
|
|
|
constructor(
|
|
|
|
constructor(
|
|
|
|
private renderer: Renderer2,
|
|
|
|
private renderer: Renderer2,
|
|
|
|
private themeService: ColorThemeService,
|
|
|
|
private themeService: ColorThemeService,
|
|
|
@ -31,5 +35,6 @@ export class AppComponent {
|
|
|
|
|
|
|
|
|
|
|
|
logout() {
|
|
|
|
logout() {
|
|
|
|
this.authService.logout().subscribe().add(() => this.router.navigate(['login']));
|
|
|
|
this.authService.logout().subscribe().add(() => this.router.navigate(['login']));
|
|
|
|
|
|
|
|
this.sideNav.close();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|