OpenSlides/client/src/app/core/services/openslides-status.service.ts
FinnStutzenstein 1c895fbea8 run prettifier
2019-01-10 12:54:48 +01:00

42 lines
827 B
TypeScript

import { Injectable } from '@angular/core';
/**
* Holds information about OpenSlides. This is not included into other services to
* avoid circular dependencies.
*/
@Injectable({
providedIn: 'root'
})
export class OpenSlidesStatusService {
/**
* Saves, if OpenSlides is in the history mode.
*/
private historyMode = false;
/**
* Returns, if OpenSlides is in the history mode.
*/
public get isInHistoryMode(): boolean {
return this.historyMode;
}
/**
* Ctor, does nothing.
*/
public constructor() {}
/**
* Enters the histroy mode
*/
public enterHistoryMode(): void {
this.historyMode = true;
}
/**
* Leaves the histroy mode
*/
public leaveHistroyMode(): void {
this.historyMode = false;
}
}