update tslint -> eslint
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
<p *ngIf="song.artist">{{song.artist}}</p>
|
||||
<p *ngIf="song.label">{{song.label}}</p>
|
||||
<p *ngIf="song.termsOfUse" class="terms-of-use">{{song.termsOfUse}}</p>
|
||||
<p *ngIf="song.origin">{{song.origin}}</p>
|
||||
<p *ngIf="song.artist">{{ song.artist }}</p>
|
||||
<p *ngIf="song.label">{{ song.label }}</p>
|
||||
<p *ngIf="song.termsOfUse" class="terms-of-use">{{ song.termsOfUse }}</p>
|
||||
<p *ngIf="song.origin">{{ song.origin }}</p>
|
||||
|
||||
<div *ngIf="song.legalOwnerId">
|
||||
<p *ngIf="song.legalOwner==='CCLI' && config">CCLI-Liednummer {{song.legalOwnerId}},
|
||||
CCLI-Lizenznummer {{config.ccliLicenseId}}</p>
|
||||
<p *ngIf="song.legalOwner!=='CCLI'">Liednummer {{song.legalOwnerId}}</p>
|
||||
<p *ngIf="song.legalOwner === 'CCLI' && config">
|
||||
CCLI-Liednummer {{ song.legalOwnerId }}, CCLI-Lizenznummer
|
||||
{{ config.ccliLicenseId }}
|
||||
</p>
|
||||
<p *ngIf="song.legalOwner !== 'CCLI'">Liednummer {{ song.legalOwnerId }}</p>
|
||||
</div>
|
||||
|
||||
@@ -6,12 +6,13 @@ describe('LegalComponent', () => {
|
||||
let component: LegalComponent;
|
||||
let fixture: ComponentFixture<LegalComponent>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [LegalComponent]
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
void TestBed.configureTestingModule({
|
||||
declarations: [LegalComponent],
|
||||
}).compileComponents();
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
);
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(LegalComponent);
|
||||
@@ -20,6 +21,6 @@ describe('LegalComponent', () => {
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
void expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -5,7 +5,7 @@ import {Config} from '../../../../services/config';
|
||||
@Component({
|
||||
selector: 'app-legal',
|
||||
templateUrl: './legal.component.html',
|
||||
styleUrls: ['./legal.component.less']
|
||||
styleUrls: ['./legal.component.less'],
|
||||
})
|
||||
export class LegalComponent {
|
||||
@Input() public song: Song;
|
||||
|
||||
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
@@ -6,12 +6,13 @@ describe('LogoComponent', () => {
|
||||
let component: LogoComponent;
|
||||
let fixture: ComponentFixture<LogoComponent>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [LogoComponent]
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
void TestBed.configureTestingModule({
|
||||
declarations: [LogoComponent],
|
||||
}).compileComponents();
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
);
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(LogoComponent);
|
||||
@@ -20,6 +21,6 @@ describe('LogoComponent', () => {
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
void expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,16 +1,8 @@
|
||||
import {Component, OnInit} from '@angular/core';
|
||||
import {Component} from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-logo',
|
||||
templateUrl: './logo.component.html',
|
||||
styleUrls: ['./logo.component.less']
|
||||
styleUrls: ['./logo.component.less'],
|
||||
})
|
||||
export class LogoComponent implements OnInit {
|
||||
|
||||
constructor() {
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
}
|
||||
export class LogoComponent {}
|
||||
|
||||
@@ -1,20 +1,31 @@
|
||||
<div *ngIf="song" [style.font-size.px]="zoom" class="fullscreen background">
|
||||
|
||||
|
||||
<div @songSwitch [class.blur]="songId==='title'" [class.hide]="songId!=='title' && songId!=='empty'"
|
||||
class="start fullscreen logo">
|
||||
<div
|
||||
@songSwitch
|
||||
[class.blur]="songId === 'title'"
|
||||
[class.hide]="songId !== 'title' && songId !== 'empty'"
|
||||
class="start fullscreen logo"
|
||||
>
|
||||
<app-logo></app-logo>
|
||||
</div>
|
||||
|
||||
<div *ngIf="songId==='title'" @songSwitch class="start fullscreen">
|
||||
<div>{{showType|showType}}</div>
|
||||
<div class="date">{{date|date:'dd.MM.yyyy'}}</div>
|
||||
<div *ngIf="songId === 'title'" @songSwitch class="start fullscreen">
|
||||
<div>{{ showType | showType }}</div>
|
||||
<div class="date">{{ date | date: "dd.MM.yyyy" }}</div>
|
||||
</div>
|
||||
|
||||
<app-song-text *ngIf="songId!=='title' && songId!=='empty'" @songSwitch [fullscreen]="true" [index]="index"
|
||||
[showSwitch]="false" [text]="song.text"
|
||||
chordMode="hide"></app-song-text>
|
||||
<app-legal *ngIf="songId!=='title' && songId!=='empty'" @songSwitch [config]="config$|async"
|
||||
[song]="song"></app-legal>
|
||||
|
||||
<app-song-text
|
||||
*ngIf="songId !== 'title' && songId !== 'empty'"
|
||||
@songSwitch
|
||||
[fullscreen]="true"
|
||||
[index]="index"
|
||||
[showSwitch]="false"
|
||||
[text]="song.text"
|
||||
chordMode="hide"
|
||||
></app-song-text>
|
||||
<app-legal
|
||||
*ngIf="songId !== 'title' && songId !== 'empty'"
|
||||
@songSwitch
|
||||
[config]="config$ | async"
|
||||
[song]="song"
|
||||
></app-legal>
|
||||
</div>
|
||||
|
||||
@@ -6,12 +6,13 @@ describe('MonitorComponent', () => {
|
||||
let component: MonitorComponent;
|
||||
let fixture: ComponentFixture<MonitorComponent>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [MonitorComponent]
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
void TestBed.configureTestingModule({
|
||||
declarations: [MonitorComponent],
|
||||
}).compileComponents();
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
);
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(MonitorComponent);
|
||||
@@ -20,6 +21,6 @@ describe('MonitorComponent', () => {
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
void expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -8,14 +8,14 @@ import {Config} from '../../../services/config';
|
||||
import {Observable} from 'rxjs';
|
||||
import {ConfigService} from '../../../services/config.service';
|
||||
import {songSwitch} from '../../../widget-modules/components/song-text/animation';
|
||||
import {Section} from '../../songs/services/section';
|
||||
import {TextRenderingService} from '../../songs/services/text-rendering.service';
|
||||
import {Show} from '../../shows/services/show';
|
||||
|
||||
@Component({
|
||||
selector: 'app-monitor',
|
||||
templateUrl: './monitor.component.html',
|
||||
styleUrls: ['./monitor.component.less'],
|
||||
animations: [songSwitch]
|
||||
animations: [songSwitch],
|
||||
})
|
||||
export class MonitorComponent implements OnInit {
|
||||
public song: Song;
|
||||
@@ -25,35 +25,37 @@ export class MonitorComponent implements OnInit {
|
||||
public index: number;
|
||||
public showType: string;
|
||||
public date: Date;
|
||||
private sections: Section[];
|
||||
public config$: Observable<Config>;
|
||||
|
||||
constructor(
|
||||
// private sections: Section[];
|
||||
|
||||
public constructor(
|
||||
private showService: ShowService,
|
||||
private songService: SongService,
|
||||
private textRenderingService: TextRenderingService,
|
||||
private globalSettingsService: GlobalSettingsService,
|
||||
private configService: ConfigService,
|
||||
private configService: ConfigService
|
||||
) {
|
||||
this.config$ = configService.get$;
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.globalSettingsService.get$.pipe(
|
||||
map(_ => _.currentShow),
|
||||
distinctUntilChanged(),
|
||||
tap(_ => this.currentShowId = _),
|
||||
switchMap(_ => this.showService.read$(_)),
|
||||
tap(_ => this.showType = _.showType),
|
||||
tap(_ => this.date = _.date.toDate()),
|
||||
tap(_ => this.songId = _.presentationSongId),
|
||||
tap(_ => this.index = _.presentationSection),
|
||||
tap(_ => this.zoom = _.presentationZoom ?? 30),
|
||||
switchMap(_ => this.songService.read$(_.presentationSongId))
|
||||
).subscribe((_: Song) => {
|
||||
this.song = _;
|
||||
this.sections = this.textRenderingService.parse(_.text, null);
|
||||
});
|
||||
public ngOnInit(): void {
|
||||
this.globalSettingsService.get$
|
||||
.pipe(
|
||||
map(_ => _.currentShow),
|
||||
distinctUntilChanged(),
|
||||
tap(_ => (this.currentShowId = _)),
|
||||
switchMap(_ => this.showService.read$(_)),
|
||||
tap(_ => (this.showType = _.showType)),
|
||||
tap(_ => (this.date = _.date.toDate())),
|
||||
tap(_ => (this.songId = _.presentationSongId)),
|
||||
tap(_ => (this.index = _.presentationSection)),
|
||||
tap(_ => (this.zoom = _.presentationZoom ?? 30)),
|
||||
switchMap((_: Show) => this.songService.read$(_.presentationSongId))
|
||||
)
|
||||
.subscribe((_: Song) => {
|
||||
this.song = _;
|
||||
// this.sections = this.textRenderingService.parse(_.text, null);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,26 +3,24 @@ import {RouterModule, Routes} from '@angular/router';
|
||||
import {RemoteComponent} from './remote/remote.component';
|
||||
import {MonitorComponent} from './monitor/monitor.component';
|
||||
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
pathMatch: 'full',
|
||||
redirectTo: 'remote'
|
||||
redirectTo: 'remote',
|
||||
},
|
||||
{
|
||||
path: 'remote',
|
||||
component: RemoteComponent
|
||||
component: RemoteComponent,
|
||||
},
|
||||
{
|
||||
path: 'monitor',
|
||||
component: MonitorComponent
|
||||
}
|
||||
component: MonitorComponent,
|
||||
},
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule]
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class PresentationRoutingModule {
|
||||
}
|
||||
export class PresentationRoutingModule {}
|
||||
|
||||
@@ -18,12 +18,9 @@ import {FormsModule, ReactiveFormsModule} from '@angular/forms';
|
||||
import {AddSongModule} from '../../widget-modules/components/add-song/add-song.module';
|
||||
import {LogoComponent} from './monitor/logo/logo.component';
|
||||
|
||||
|
||||
@NgModule({
|
||||
declarations: [MonitorComponent, RemoteComponent, LegalComponent, LogoComponent],
|
||||
exports: [
|
||||
RemoteComponent
|
||||
],
|
||||
exports: [RemoteComponent],
|
||||
imports: [
|
||||
CommonModule,
|
||||
PresentationRoutingModule,
|
||||
@@ -38,8 +35,7 @@ import {LogoComponent} from './monitor/logo/logo.component';
|
||||
MatSliderModule,
|
||||
FormsModule,
|
||||
AddSongModule,
|
||||
ReactiveFormsModule
|
||||
]
|
||||
ReactiveFormsModule,
|
||||
],
|
||||
})
|
||||
export class PresentationModule {
|
||||
}
|
||||
export class PresentationModule {}
|
||||
|
||||
@@ -1,41 +1,60 @@
|
||||
<div *ngIf="shows$|async as shows">
|
||||
<div *ngIf="shows$ | async as shows">
|
||||
<app-card>
|
||||
<p *ngIf="!shows.length" @fade>
|
||||
Es ist derzeit keine Veranstaltung vorhanden
|
||||
</p>
|
||||
|
||||
<p *ngIf="!shows.length" @fade>Es ist derzeit keine Veranstaltung vorhanden</p>
|
||||
|
||||
<mat-form-field *ngIf="shows.length>0" @fade appearance="outline">
|
||||
<mat-form-field *ngIf="shows.length > 0" @fade appearance="outline">
|
||||
<mat-label>Veranstaltung</mat-label>
|
||||
<mat-select [formControl]="showControl">
|
||||
<mat-option *ngFor="let show of shows" [value]="show.id">
|
||||
{{show.showType|showType}}, {{show.date.toDate()|date:'dd.MM.yyyy'}}
|
||||
{{ show.showType | showType }},
|
||||
{{ show.date.toDate() | date: "dd.MM.yyyy" }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<ng-container *ngIf="!progress">
|
||||
<div *ngIf="show" class="song-parts padding-bottom">
|
||||
<div (click)="onSectionClick('title', -1)"
|
||||
[class.active]="show.presentationSongId==='title'"
|
||||
class="song-part">
|
||||
<div
|
||||
(click)="onSectionClick('title', -1)"
|
||||
[class.active]="show.presentationSongId === 'title'"
|
||||
class="song-part"
|
||||
>
|
||||
<div class="head">Veranstaltung</div>
|
||||
</div>
|
||||
<div (click)="onSectionClick('empty', -1)"
|
||||
[class.active]="show.presentationSongId==='empty'"
|
||||
class="song-part">
|
||||
<div
|
||||
(click)="onSectionClick('empty', -1)"
|
||||
[class.active]="show.presentationSongId === 'empty'"
|
||||
class="song-part"
|
||||
>
|
||||
<div class="head">Leer</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngFor="let song of presentationSongs" @fade class="song">
|
||||
<div [class.active]="show.presentationSongId===song.id" class="title song-part">
|
||||
<div (click)="onSectionClick(song.id, -1)" class="head">{{song.title}}</div>
|
||||
<div
|
||||
[class.active]="show.presentationSongId === song.id"
|
||||
class="title song-part"
|
||||
>
|
||||
<div (click)="onSectionClick(song.id, -1)" class="head">
|
||||
{{ song.title }}
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="show" class="song-parts">
|
||||
<div (click)="onSectionClick(song.id, i)" *ngFor="let section of song.sections; index as i"
|
||||
[class.active]="show.presentationSongId===song.id && show.presentationSection===i"
|
||||
class="song-part">
|
||||
<div class="head">{{section.type|sectionType}} {{section.number + 1}}</div>
|
||||
<div class="fragment">{{getFirstLine(section)}}</div>
|
||||
<div
|
||||
(click)="onSectionClick(song.id, i)"
|
||||
*ngFor="let section of song.sections; index as i"
|
||||
[class.active]="
|
||||
show.presentationSongId === song.id &&
|
||||
show.presentationSection === i
|
||||
"
|
||||
class="song-part"
|
||||
>
|
||||
<div class="head">
|
||||
{{ section.type | sectionType }} {{ section.number + 1 }}
|
||||
</div>
|
||||
<div class="fragment">{{ getFirstLine(section) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -56,11 +75,13 @@
|
||||
</mat-slider>
|
||||
</div>
|
||||
|
||||
|
||||
<app-add-song *ngIf="show" [addedLive]="true" [showId]="currentShowId" [showSongs]="showSongs"
|
||||
[songs]="songs"></app-add-song>
|
||||
<app-add-song
|
||||
*ngIf="show"
|
||||
[addedLive]="true"
|
||||
[showId]="currentShowId"
|
||||
[showSongs]="showSongs"
|
||||
[songs]="songs"
|
||||
></app-add-song>
|
||||
</ng-container>
|
||||
</app-card>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
@@ -6,12 +6,13 @@ describe('RemoteComponent', () => {
|
||||
let component: RemoteComponent;
|
||||
let fixture: ComponentFixture<RemoteComponent>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [RemoteComponent]
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
void TestBed.configureTestingModule({
|
||||
declarations: [RemoteComponent],
|
||||
}).compileComponents();
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
);
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(RemoteComponent);
|
||||
@@ -20,6 +21,6 @@ describe('RemoteComponent', () => {
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
void expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -25,7 +25,7 @@ export interface PresentationSong {
|
||||
selector: 'app-remote',
|
||||
templateUrl: './remote.component.html',
|
||||
styleUrls: ['./remote.component.less'],
|
||||
animations: [fade]
|
||||
animations: [fade],
|
||||
})
|
||||
export class RemoteComponent {
|
||||
public shows$: Observable<Show[]>;
|
||||
@@ -39,24 +39,26 @@ export class RemoteComponent {
|
||||
public faDesktop = faDesktop;
|
||||
public showControl = new FormControl();
|
||||
|
||||
constructor(
|
||||
public constructor(
|
||||
private showService: ShowService,
|
||||
private showSongService: ShowSongService,
|
||||
private songService: SongService,
|
||||
private textRenderingService: TextRenderingService,
|
||||
private globalSettingsService: GlobalSettingsService,
|
||||
private globalSettingsService: GlobalSettingsService
|
||||
) {
|
||||
this.shows$ = showService.list$(true);
|
||||
songService.list$().subscribe(_ => this.songs = _);
|
||||
songService.list$().subscribe(_ => (this.songs = _));
|
||||
|
||||
globalSettingsService.get$.pipe(
|
||||
map(_ => _.currentShow),
|
||||
distinctUntilChanged()
|
||||
).subscribe(_ => {
|
||||
this.showControl.setValue(_, {emitEvent: false});
|
||||
this.onShowChanged(_, false);
|
||||
});
|
||||
this.showControl.valueChanges.subscribe(value => this.onShowChanged(value));
|
||||
globalSettingsService.get$
|
||||
.pipe(
|
||||
map(_ => _.currentShow),
|
||||
distinctUntilChanged()
|
||||
)
|
||||
.subscribe(_ => {
|
||||
this.showControl.setValue(_, {emitEvent: false});
|
||||
void this.onShowChanged(_, false);
|
||||
});
|
||||
this.showControl.valueChanges.subscribe((value: string) => void this.onShowChanged(value));
|
||||
}
|
||||
|
||||
public async onShowChanged(change: string, updateShow = true): Promise<void> {
|
||||
@@ -68,16 +70,14 @@ export class RemoteComponent {
|
||||
await this.showService.update$(change, {presentationSongId: 'title'});
|
||||
}
|
||||
this.currentShowId = change;
|
||||
this.showService.read$(change).subscribe(_ => this.show = _);
|
||||
this.showService.read$(change).subscribe(_ => (this.show = _));
|
||||
this.showSongService.list$(change).subscribe(_ => {
|
||||
this.showSongs = _;
|
||||
this.presentationSongs = _
|
||||
.map(song => this.songs.filter(f => f.id == song.songId)[0])
|
||||
.map(song => ({
|
||||
id: song.id,
|
||||
title: song.title,
|
||||
sections: this.textRenderingService.parse(song.text, null)
|
||||
}));
|
||||
this.presentationSongs = _.map(song => this.songs.filter(f => f.id === song.songId)[0]).map(song => ({
|
||||
id: song.id,
|
||||
title: song.title,
|
||||
sections: this.textRenderingService.parse(song.text, null),
|
||||
}));
|
||||
});
|
||||
await delay(500);
|
||||
this.progress = false;
|
||||
@@ -90,13 +90,11 @@ export class RemoteComponent {
|
||||
public async onSectionClick(id: string, index: number): Promise<void> {
|
||||
await this.showService.update$(this.currentShowId, {
|
||||
presentationSongId: id,
|
||||
presentationSection: index
|
||||
presentationSection: index,
|
||||
});
|
||||
}
|
||||
|
||||
public async onZoom(zoom: number) {
|
||||
await this.showService.update$(this.currentShowId, {
|
||||
presentationZoom: zoom,
|
||||
});
|
||||
public async onZoom(zoom: number): Promise<void> {
|
||||
await this.showService.update$(this.currentShowId, {presentationZoom: zoom});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,11 +6,11 @@ describe('PresentationService', () => {
|
||||
let service: PresentationService;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
void TestBed.configureTestingModule({});
|
||||
service = TestBed.inject(PresentationService);
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(service).toBeTruthy();
|
||||
void expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
import {Injectable} from '@angular/core';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class PresentationService {
|
||||
|
||||
constructor() {
|
||||
}
|
||||
}
|
||||
export class PresentationService {}
|
||||
|
||||
Reference in New Issue
Block a user