publish show
This commit is contained in:
@@ -1,3 +1,16 @@
|
||||
:host {
|
||||
position: fixed;
|
||||
display: block;
|
||||
z-index: 1;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: #000c;
|
||||
padding: 50px;
|
||||
box-sizing: border-box;
|
||||
box-shadow: 0px 0px 26px 10px #000;
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 15px;
|
||||
margin: 10px 0 0 0;
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
<div [style.font-size.px]="zoom" class="fullscreen">
|
||||
|
||||
<app-song-text [showSwitch]="false" [text]="song.text" chordMode="hide"></app-song-text>
|
||||
|
||||
<app-legal [song]="song"></app-legal>
|
||||
</div>
|
||||
|
||||
@@ -14,4 +14,5 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
transition: 300ms all ease-in-out;
|
||||
}
|
||||
|
||||
@@ -13,8 +13,8 @@ import {Song} from '../../songs/services/song';
|
||||
})
|
||||
export class MonitorComponent implements OnInit {
|
||||
public song: Song;
|
||||
public zoom: number;
|
||||
private index: number;
|
||||
private zoom: number;
|
||||
private sections: Section[];
|
||||
|
||||
constructor(
|
||||
|
||||
@@ -13,6 +13,8 @@ import {SongTextModule} from '../../widget-modules/components/song-text/song-tex
|
||||
import {LegalComponent} from './monitor/legal/legal.component';
|
||||
import {MatButtonModule} from '@angular/material/button';
|
||||
import {FontAwesomeModule} from '@fortawesome/angular-fontawesome';
|
||||
import {MatSliderModule} from '@angular/material/slider';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
|
||||
|
||||
@NgModule({
|
||||
@@ -27,7 +29,9 @@ import {FontAwesomeModule} from '@fortawesome/angular-fontawesome';
|
||||
SectionTypeTranslatorModule,
|
||||
SongTextModule,
|
||||
MatButtonModule,
|
||||
FontAwesomeModule
|
||||
FontAwesomeModule,
|
||||
MatSliderModule,
|
||||
FormsModule
|
||||
]
|
||||
})
|
||||
export class PresentationModule {
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
<div *ngIf="shows$|async as shows">
|
||||
<app-card>
|
||||
<mat-form-field appearance="outline">
|
||||
|
||||
<p *ngIf="!shows.length">Es ist derzeit keine Veranstaltung vorhanden</p>
|
||||
|
||||
<mat-form-field *ngIf="shows.length>0" appearance="outline">
|
||||
<mat-label>Veranstaltung</mat-label>
|
||||
<mat-select (selectionChange)="onShowChanged($event)">
|
||||
<mat-option *ngFor="let show of shows" [value]="show.id">
|
||||
@@ -21,18 +24,20 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="show">
|
||||
<div *ngIf="show" class="div-bottom">
|
||||
<button [routerLink]="'/presentation/monitor/' + currentShowId" mat-icon-button>
|
||||
<fa-icon [icon]="faDesktop"></fa-icon>
|
||||
</button>
|
||||
|
||||
<button (click)="onZoomIn()" mat-icon-button>
|
||||
<fa-icon [icon]="faZoomIn"></fa-icon>
|
||||
</button>
|
||||
{{show.presentationZoom}}px
|
||||
<button (click)="onZoomOut()" mat-icon-button>
|
||||
<fa-icon [icon]="faZoomOut"></fa-icon>
|
||||
</button>
|
||||
<mat-slider
|
||||
(ngModelChange)="onZoom($event)"
|
||||
[max]="100"
|
||||
[min]="10"
|
||||
[ngModel]="show.presentationZoom"
|
||||
[step]="2"
|
||||
[thumbLabel]="true"
|
||||
>
|
||||
</mat-slider>
|
||||
</div>
|
||||
</app-card>
|
||||
|
||||
|
||||
@@ -65,3 +65,8 @@
|
||||
.fragment {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.div-bottom {
|
||||
display: grid;
|
||||
grid-template-columns: 40px auto;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import {Component} from '@angular/core';
|
||||
import {ShowDataService} from '../../shows/services/show-data.service';
|
||||
import {Observable} from 'rxjs';
|
||||
import {Show} from '../../shows/services/show';
|
||||
import {MatSelectChange} from '@angular/material/select';
|
||||
@@ -7,9 +6,8 @@ import {ShowSongService} from '../../shows/services/show-song.service';
|
||||
import {SongService} from '../../songs/services/song.service';
|
||||
import {Song} from '../../songs/services/song';
|
||||
import {Section, TextRenderingService} from '../../songs/services/text-rendering.service';
|
||||
import {faSearchPlus} from '@fortawesome/free-solid-svg-icons/faSearchPlus';
|
||||
import {faSearchMinus} from '@fortawesome/free-solid-svg-icons/faSearchMinus';
|
||||
import {faDesktop} from '@fortawesome/free-solid-svg-icons/faDesktop';
|
||||
import {ShowService} from '../../shows/services/show.service';
|
||||
|
||||
export interface PresentationSong {
|
||||
id: string;
|
||||
@@ -29,23 +27,21 @@ export class RemoteComponent {
|
||||
public presentationSongs: PresentationSong[];
|
||||
public currentShowId: string;
|
||||
|
||||
public faZoomIn = faSearchPlus;
|
||||
public faZoomOut = faSearchMinus;
|
||||
public faDesktop = faDesktop;
|
||||
|
||||
constructor(
|
||||
private showDataService: ShowDataService,
|
||||
private showService: ShowService,
|
||||
private showSongService: ShowSongService,
|
||||
private songService: SongService,
|
||||
private textRenderingService: TextRenderingService
|
||||
) {
|
||||
this.shows$ = showDataService.list$();
|
||||
this.shows$ = showService.list$(true);
|
||||
songService.list$().subscribe(_ => this.songs = _);
|
||||
}
|
||||
|
||||
public onShowChanged(change: MatSelectChange): void {
|
||||
this.currentShowId = change.value;
|
||||
this.showDataService.read$(change.value).subscribe(_ => this.show = _);
|
||||
this.showService.read$(change.value).subscribe(_ => this.show = _);
|
||||
this.showSongService.list$(change.value).subscribe(_ => {
|
||||
this.presentationSongs = _
|
||||
.map(song => this.songs.filter(f => f.id == song.songId)[0])
|
||||
@@ -62,22 +58,15 @@ export class RemoteComponent {
|
||||
}
|
||||
|
||||
public async onSectionClick(id: string, index: number): Promise<void> {
|
||||
await this.showDataService.update(this.currentShowId, {
|
||||
await this.showService.update$(this.currentShowId, {
|
||||
presentationSongId: id,
|
||||
presentationSection: index
|
||||
})
|
||||
}
|
||||
|
||||
public async onZoomIn() {
|
||||
debugger
|
||||
await this.showDataService.update(this.currentShowId, {
|
||||
presentationZoom: (this.show.presentationZoom ?? 30) + 2,
|
||||
});
|
||||
}
|
||||
|
||||
public async onZoomOut() {
|
||||
await this.showDataService.update(this.currentShowId, {
|
||||
presentationZoom: (this.show.presentationZoom ?? 30) - 2,
|
||||
public async onZoom(zoom: number) {
|
||||
await this.showService.update$(this.currentShowId, {
|
||||
presentationZoom: zoom,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user