web-remote/src/app/app.component.ts

56 lines
1.2 KiB
TypeScript
Raw Normal View History

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';
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',
styleUrls: ['./app.component.scss']
2018-08-07 11:51:51 +00:00
})
export class AppComponent {
fastSwitching = false;
state: State = new State();
constructor(private openlpService: OpenLPService) {
openlpService.stateChanged$.subscribe(item => this.state = item);
}
nextItem() {
this.openlpService.nextItem().subscribe();
}
previousItem() {
this.openlpService.previousItem().subscribe();
}
nextSlide() {
this.openlpService.nextSlide().subscribe();
}
previousSlide() {
this.openlpService.previousSlide().subscribe();
}
blankDisplay() {
this.openlpService.blankDisplay().subscribe();
}
themeDisplay() {
this.openlpService.themeDisplay().subscribe();
}
desktopDisplay() {
this.openlpService.desktopDisplay().subscribe();
}
showDisplay() {
this.openlpService.showDisplay().subscribe();
}
2018-08-27 18:21:35 +00:00
sliderChanged(event: MatSlideToggleChange) {
this.fastSwitching = event.checked;
}
2018-08-07 11:51:51 +00:00
}