2018-11-09 13:44:39 +01:00
|
|
|
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 {
|
2019-01-10 12:54:48 +01:00
|
|
|
this.historyMode = false;
|
2018-11-09 13:44:39 +01:00
|
|
|
}
|
|
|
|
}
|