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

52 lines
1.0 KiB
TypeScript
Raw Normal View History

2018-08-07 11:51:51 +00:00
import { Component } from '@angular/core';
import { State } from './state';
import { OpenLPService } from './openlp.service';
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 {
title = 'app';
state: State = new State();
constructor(private openlpService: OpenLPService) {
openlpService.stateChanged$.subscribe(item => this.state = item);
}
2018-08-20 13:25:28 +00:00
nextItem() {
2018-08-22 19:29:20 +00:00
this.openlpService.nextItem().subscribe();
}
previousItem() {
2018-08-22 19:29:20 +00:00
this.openlpService.previousItem().subscribe();
}
nextSlide() {
2018-08-22 19:29:20 +00:00
this.openlpService.nextSlide().subscribe();
}
previousSlide() {
2018-08-22 19:29:20 +00:00
this.openlpService.previousSlide().subscribe();
}
blankDisplay() {
2018-08-22 19:29:20 +00:00
this.openlpService.blankDisplay().subscribe();
}
themeDisplay() {
2018-08-22 19:29:20 +00:00
this.openlpService.themeDisplay().subscribe();
}
desktopDisplay() {
2018-08-22 19:29:20 +00:00
this.openlpService.desktopDisplay().subscribe();
}
showDisplay() {
2018-08-22 19:29:20 +00:00
this.openlpService.showDisplay().subscribe();
}
2018-08-07 11:51:51 +00:00
}