#1513 Added the update available icon

This commit is contained in:
tidusjar 2017-09-28 20:25:33 +01:00
commit f689af82f0
14 changed files with 104 additions and 160 deletions

View file

@ -3,7 +3,7 @@ import { Router } from "@angular/router";
import { AuthService } from "./auth/auth.service";
import { ILocalUser } from "./auth/IUserLogin";
import { NotificationService } from "./services";
import { SettingsService } from "./services";
import { JobService, SettingsService } from "./services";
import { ICustomizationSettings } from "./interfaces";
@ -17,8 +17,13 @@ export class AppComponent implements OnInit {
public customizationSettings: ICustomizationSettings;
public user: ILocalUser;
public showNav: boolean;
public updateAvailable: boolean;
constructor(public notificationService: NotificationService, public authService: AuthService, private router: Router, private settingsService: SettingsService) { }
constructor(public notificationService: NotificationService,
public authService: AuthService,
private readonly router: Router,
private readonly settingsService: SettingsService,
private readonly jobService: JobService) { }
public ngOnInit() {
this.user = this.authService.claims();
@ -29,6 +34,8 @@ export class AppComponent implements OnInit {
this.user = this.authService.claims();
this.showNav = this.authService.loggedIn();
});
this.jobService.getCachedUpdate().subscribe(x => this.updateAvailable = x);
}
public hasRole(role: string): boolean {