2018-08-07 11:51:51 +00:00
|
|
|
import { Component } from '@angular/core';
|
2018-08-22 20:04:41 +00:00
|
|
|
import { State } from './responses';
|
2018-08-19 20:37:53 +00:00
|
|
|
import { OpenLPService } from './openlp.service';
|
2018-08-27 18:21:35 +00:00
|
|
|
import { MatSlideToggleChange } from '@angular/material';
|
2018-08-07 11:51:51 +00:00
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'app-root',
|
|
|
|
templateUrl: './app.component.html',
|
2018-08-19 20:37:53 +00:00
|
|
|
styleUrls: ['./app.component.scss']
|
2018-08-07 11:51:51 +00:00
|
|
|
})
|
|
|
|
export class AppComponent {
|
2019-10-06 00:28:36 +00:00
|
|
|
fastSwitching = false;
|
2018-08-19 20:37:53 +00:00
|
|
|
state: State = new State();
|
|
|
|
|
|
|
|
constructor(private openlpService: OpenLPService) {
|
|
|
|
openlpService.stateChanged$.subscribe(item => this.state = item);
|
|
|
|
}
|
2019-10-06 00:28:36 +00:00
|
|
|
|
2018-08-19 20:37:53 +00:00
|
|
|
nextItem() {
|
2019-10-06 00:28:36 +00:00
|
|
|
this.openlpService.nextItem().subscribe();
|
2018-08-19 20:37:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
previousItem() {
|
2019-10-06 00:28:36 +00:00
|
|
|
this.openlpService.previousItem().subscribe();
|
2018-08-19 20:37:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
nextSlide() {
|
2019-10-06 00:28:36 +00:00
|
|
|
this.openlpService.nextSlide().subscribe();
|
2018-08-19 20:37:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
previousSlide() {
|
2019-10-06 00:28:36 +00:00
|
|
|
this.openlpService.previousSlide().subscribe();
|
2018-08-19 20:37:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
blankDisplay() {
|
2019-10-06 00:28:36 +00:00
|
|
|
this.openlpService.blankDisplay().subscribe();
|
2018-08-19 20:37:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
themeDisplay() {
|
2019-10-06 00:28:36 +00:00
|
|
|
this.openlpService.themeDisplay().subscribe();
|
2018-08-19 20:37:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
desktopDisplay() {
|
2019-10-06 00:28:36 +00:00
|
|
|
this.openlpService.desktopDisplay().subscribe();
|
2018-08-19 20:37:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
showDisplay() {
|
2019-10-06 00:28:36 +00:00
|
|
|
this.openlpService.showDisplay().subscribe();
|
2018-08-19 20:37:53 +00:00
|
|
|
}
|
|
|
|
|
2018-08-27 18:21:35 +00:00
|
|
|
sliderChanged(event: MatSlideToggleChange) {
|
|
|
|
this.fastSwitching = event.checked;
|
|
|
|
}
|
|
|
|
|
2018-08-07 11:51:51 +00:00
|
|
|
}
|