diff --git a/client/src/app/core/core-services/offline.service.ts b/client/src/app/core/core-services/offline.service.ts index f13129e09..71ac6af68 100644 --- a/client/src/app/core/core-services/offline.service.ts +++ b/client/src/app/core/core-services/offline.service.ts @@ -1,4 +1,5 @@ import { Injectable } from '@angular/core'; +import { WebsocketService } from './websocket.service'; /** * This service handles everything connected with being offline. @@ -18,7 +19,16 @@ export class OfflineService { /** */ - public constructor() {} + public constructor(private socketService: WebsocketService) {} + + /** + * Determines of you are either in Offline mode or not connected via websocket + * + * @returns whether the client is offline or not connected + */ + public isOffline(): boolean { + return this.offline || !this.socketService.isConnected; + } /** * Sets the offline flag. Restores the DataStoreService to the last known configuration. diff --git a/client/src/app/shared/components/projector/projector.component.html b/client/src/app/shared/components/projector/projector.component.html index 947a894ed..a74167b73 100644 --- a/client/src/app/shared/components/projector/projector.component.html +++ b/client/src/app/shared/components/projector/projector.component.html @@ -1,5 +1,10 @@