update tslint -> eslint

This commit is contained in:
2021-05-21 20:17:26 +02:00
parent 80260df71f
commit a195fafa6b
252 changed files with 3080 additions and 2420 deletions

View File

@@ -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>

View File

@@ -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();
});
});

View File

@@ -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

View File

@@ -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();
});
});

View File

@@ -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 {}

View File

@@ -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>

View File

@@ -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();
});
});

View File

@@ -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);
});
}
}