import { Component , OnInit } from 'angular-ts-decorators' ; import autobind from 'autobind-decorator' ; import Globals from '../../shared/global-shared.constants' ; import { UtilityService } from '../../shared/utility/utility.service' ; import { RoutePath } from '../app.enum' ; @ autobind @ Component ( { controllerAs : 'vm' , selector : 'appBackground' , styles : [ require ( './app-background.component.scss' ) ] , template : require ( './app-background.component.html' ) } ) export class AppBackgroundComponent implements OnInit { $timeout : ng . ITimeoutService ; utilitySvc : UtilityService ; animateClouds = false ; static $inject = [ '$timeout' , 'UtilityService' ] ; constructor ( $timeout , UtilitySvc ) { this . $timeout = $timeout ; this . utilitySvc = UtilitySvc ; } pageHasBackground ( ) { return ! this . utilitySvc . checkCurrentRoute ( RoutePath . Scan ) ; } pageHasCloudBackground ( ) { return ( this . utilitySvc . checkCurrentRoute ( RoutePath . Login ) || this . utilitySvc . checkCurrentRoute ( RoutePath . Support ) || this . utilitySvc . checkCurrentRoute ( RoutePath . Permissions ) || this . utilitySvc . checkCurrentRoute ( RoutePath . SyncRemoved ) || this . utilitySvc . checkCurrentRoute ( RoutePath . Updated ) || this . utilitySvc . checkCurrentRoute ( RoutePath . Help ) ) ; } ngOnInit ( ) { this . $timeout ( ( ) => { this . animateClouds = true ; } , Globals . InterfaceReadyTimeout ) ; } }