clean up and lint files

This commit is contained in:
2025-01-05 10:29:29 +01:00
parent 54ee9a5b11
commit 189478f078
137 changed files with 1096 additions and 1340 deletions

View File

@@ -6,13 +6,11 @@ describe('LegalComponent', () => {
let component: LegalComponent;
let fixture: ComponentFixture<LegalComponent>;
beforeEach(
waitForAsync(() => {
void TestBed.configureTestingModule({
imports: [LegalComponent],
}).compileComponents();
}),
);
beforeEach(waitForAsync(() => {
void TestBed.configureTestingModule({
imports: [LegalComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(LegalComponent);

View File

@@ -1,13 +1,13 @@
import {Component, Input} from '@angular/core';
import {Song} from '../../../songs/services/song';
import {Config} from '../../../../services/config';
import { NgIf } from '@angular/common';
import {NgIf} from '@angular/common';
@Component({
selector: 'app-legal',
templateUrl: './legal.component.html',
styleUrls: ['./legal.component.less'],
imports: [NgIf],
selector: 'app-legal',
templateUrl: './legal.component.html',
styleUrls: ['./legal.component.less'],
imports: [NgIf],
})
export class LegalComponent {
@Input() public song: Song | null = null;

View File

@@ -6,13 +6,11 @@ describe('LogoComponent', () => {
let component: LogoComponent;
let fixture: ComponentFixture<LogoComponent>;
beforeEach(
waitForAsync(() => {
void TestBed.configureTestingModule({
imports: [LogoComponent],
}).compileComponents();
}),
);
beforeEach(waitForAsync(() => {
void TestBed.configureTestingModule({
imports: [LogoComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(LogoComponent);

View File

@@ -1,9 +1,8 @@
import {Component} from '@angular/core';
@Component({
selector: 'app-logo',
templateUrl: './logo.component.html',
styleUrls: ['./logo.component.less'],
selector: 'app-logo',
templateUrl: './logo.component.html',
styleUrls: ['./logo.component.less'],
})
export class LogoComponent {
}
export class LogoComponent {}

View File

@@ -34,8 +34,8 @@
[fullscreen]="true"
[header]="song.title"
[index]="index??0"
[showSwitch]="false"
[showComments]="false"
[showSwitch]="false"
[text]="song.text"
chordMode="hide"
></app-song-text>

View File

@@ -6,13 +6,11 @@ describe('MonitorComponent', () => {
let component: MonitorComponent;
let fixture: ComponentFixture<MonitorComponent>;
beforeEach(
waitForAsync(() => {
void TestBed.configureTestingModule({
imports: [MonitorComponent],
}).compileComponents();
}),
);
beforeEach(waitForAsync(() => {
void TestBed.configureTestingModule({
imports: [MonitorComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(MonitorComponent);

View File

@@ -10,29 +10,20 @@ import {ConfigService} from '../../../services/config.service';
import {songSwitch} from '../../../widget-modules/components/song-text/animation';
import {TextRenderingService} from '../../songs/services/text-rendering.service';
import {PresentationBackground, Show} from '../../shows/services/show';
import {GlobalSettings} from '../../../services/global-settings';
import {ShowSongService} from '../../shows/services/show-song.service';
import {openFullscreen} from '../../../services/fullscreen';
import { NgIf, AsyncPipe, DatePipe } from '@angular/common';
import { LogoComponent } from './logo/logo.component';
import { SongTextComponent } from '../../../widget-modules/components/song-text/song-text.component';
import { LegalComponent } from './legal/legal.component';
import { ShowTypePipe } from '../../../widget-modules/pipes/show-type-translater/show-type.pipe';
import {AsyncPipe, DatePipe, NgIf} from '@angular/common';
import {LogoComponent} from './logo/logo.component';
import {SongTextComponent} from '../../../widget-modules/components/song-text/song-text.component';
import {LegalComponent} from './legal/legal.component';
import {ShowTypePipe} from '../../../widget-modules/pipes/show-type-translater/show-type.pipe';
@Component({
selector: 'app-monitor',
templateUrl: './monitor.component.html',
styleUrls: ['./monitor.component.less'],
animations: [songSwitch],
imports: [
NgIf,
LogoComponent,
SongTextComponent,
LegalComponent,
AsyncPipe,
DatePipe,
ShowTypePipe,
],
selector: 'app-monitor',
templateUrl: './monitor.component.html',
styleUrls: ['./monitor.component.less'],
animations: [songSwitch],
imports: [NgIf, LogoComponent, SongTextComponent, LegalComponent, AsyncPipe, DatePipe, ShowTypePipe],
})
export class MonitorComponent implements OnInit {
public song: Song | null = null;
@@ -54,7 +45,7 @@ export class MonitorComponent implements OnInit {
private textRenderingService: TextRenderingService,
private globalSettingsService: GlobalSettingsService,
private configService: ConfigService,
private cRef: ChangeDetectorRef,
private cRef: ChangeDetectorRef
) {
this.config$ = configService.get$();
}
@@ -65,15 +56,15 @@ export class MonitorComponent implements OnInit {
.pipe(
debounceTime(100),
filter(_ => !!_),
map(_ => _ as GlobalSettings),
map(_ => _),
map(_ => _.currentShow),
distinctUntilChanged(),
tap(_ => (this.currentShowId = _)),
tap(_ => (this.currentShowId = _))
)
.pipe(
switchMap(_ => this.showService.read$(_)),
filter(_ => !!_),
map(_ => _ as Show),
map(_ => _),
tap<Show>(_ => {
this.showType = _.showType;
this.date = _.date.toDate();
@@ -90,7 +81,7 @@ export class MonitorComponent implements OnInit {
}),
switchMap((_: Show) => this.showSongService.read$(_.id, _.presentationSongId)),
filter(_ => !!_),
map(_ => _ as Song),
map(_ => _ as Song)
)
.subscribe(_ => {
this.song = _;

View File

@@ -28,5 +28,4 @@ const routes: Routes = [
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
})
export class PresentationRoutingModule {
}
export class PresentationRoutingModule {}

View File

@@ -22,8 +22,8 @@ import {SectionTypePipe} from '../../widget-modules/pipes/section-type-translato
import {ShowTypePipe} from '../../widget-modules/pipes/show-type-translater/show-type.pipe';
@NgModule({
exports: [RemoteComponent],
imports: [
exports: [RemoteComponent],
imports: [
CommonModule,
PresentationRoutingModule,
MatFormFieldModule,
@@ -38,7 +38,11 @@ import {ShowTypePipe} from '../../widget-modules/pipes/show-type-translater/show
AddSongComponent,
ReactiveFormsModule,
MatInputModule,
MonitorComponent, RemoteComponent, LegalComponent, LogoComponent, SelectComponent,
],
MonitorComponent,
RemoteComponent,
LegalComponent,
LogoComponent,
SelectComponent,
],
})
export class PresentationModule {}

View File

@@ -6,13 +6,11 @@ describe('RemoteComponent', () => {
let component: RemoteComponent;
let fixture: ComponentFixture<RemoteComponent>;
beforeEach(
waitForAsync(() => {
void TestBed.configureTestingModule({
imports: [RemoteComponent],
}).compileComponents();
}),
);
beforeEach(waitForAsync(() => {
void TestBed.configureTestingModule({
imports: [RemoteComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(RemoteComponent);

View File

@@ -11,22 +11,21 @@ import {debounceTime, filter, map} from 'rxjs/operators';
import {fade} from '../../../animations';
import {TextRenderingService} from '../../songs/services/text-rendering.service';
import {Section} from '../../songs/services/section';
import {GlobalSettings} from '../../../services/global-settings';
import {LineType} from '../../songs/services/line-type';
import { NgIf, NgFor, AsyncPipe, DatePipe } from '@angular/common';
import { CardComponent } from '../../../widget-modules/components/card/card.component';
import { MatFormField, MatLabel } from '@angular/material/form-field';
import { MatInput } from '@angular/material/input';
import { ReactiveFormsModule, FormsModule } from '@angular/forms';
import { MatButton } from '@angular/material/button';
import { RouterLink } from '@angular/router';
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
import { MatSelect } from '@angular/material/select';
import { MatOption } from '@angular/material/core';
import { MatSlider, MatSliderThumb } from '@angular/material/slider';
import { AddSongComponent } from '../../../widget-modules/components/add-song/add-song.component';
import { ShowTypePipe } from '../../../widget-modules/pipes/show-type-translater/show-type.pipe';
import { SectionTypePipe } from '../../../widget-modules/pipes/section-type-translator/section-type.pipe';
import {AsyncPipe, DatePipe, NgFor, NgIf} from '@angular/common';
import {CardComponent} from '../../../widget-modules/components/card/card.component';
import {MatFormField, MatLabel} from '@angular/material/form-field';
import {MatInput} from '@angular/material/input';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {MatButton} from '@angular/material/button';
import {RouterLink} from '@angular/router';
import {FaIconComponent} from '@fortawesome/angular-fontawesome';
import {MatSelect} from '@angular/material/select';
import {MatOption} from '@angular/material/core';
import {MatSlider, MatSliderThumb} from '@angular/material/slider';
import {AddSongComponent} from '../../../widget-modules/components/add-song/add-song.component';
import {ShowTypePipe} from '../../../widget-modules/pipes/show-type-translater/show-type.pipe';
import {SectionTypePipe} from '../../../widget-modules/pipes/section-type-translator/section-type.pipe';
export interface PresentationSong {
id: string;
@@ -35,33 +34,33 @@ export interface PresentationSong {
}
@Component({
selector: 'app-remote',
templateUrl: './remote.component.html',
styleUrls: ['./remote.component.less'],
animations: [fade],
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [
NgIf,
CardComponent,
NgFor,
MatFormField,
MatLabel,
MatInput,
ReactiveFormsModule,
FormsModule,
MatButton,
RouterLink,
FaIconComponent,
MatSelect,
MatOption,
MatSlider,
MatSliderThumb,
AddSongComponent,
AsyncPipe,
DatePipe,
ShowTypePipe,
SectionTypePipe,
],
selector: 'app-remote',
templateUrl: './remote.component.html',
styleUrls: ['./remote.component.less'],
animations: [fade],
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [
NgIf,
CardComponent,
NgFor,
MatFormField,
MatLabel,
MatInput,
ReactiveFormsModule,
FormsModule,
MatButton,
RouterLink,
FaIconComponent,
MatSelect,
MatOption,
MatSlider,
MatSliderThumb,
AddSongComponent,
AsyncPipe,
DatePipe,
ShowTypePipe,
SectionTypePipe,
],
})
export class RemoteComponent {
public show: Show | null = null;
@@ -81,12 +80,12 @@ export class RemoteComponent {
private songService: SongService,
private textRenderingService: TextRenderingService,
globalSettingsService: GlobalSettingsService,
private cRef: ChangeDetectorRef,
private cRef: ChangeDetectorRef
) {
globalSettingsService.get$
.pipe(
filter(_ => !!_),
map(_ => _.currentShow),
map(_ => _.currentShow)
)
.subscribe(_ => {
this.onShowChanged(_);

View File

@@ -5,27 +5,18 @@ import {Show} from '../../shows/services/show';
import {GlobalSettingsService} from '../../../services/global-settings.service';
import {Router} from '@angular/router';
import {fade} from '../../../animations';
import { NgIf, NgFor, AsyncPipe, DatePipe } from '@angular/common';
import { CardComponent } from '../../../widget-modules/components/card/card.component';
import { MatButton } from '@angular/material/button';
import { UserNameComponent } from '../../../services/user/user-name/user-name.component';
import { ShowTypePipe } from '../../../widget-modules/pipes/show-type-translater/show-type.pipe';
import {AsyncPipe, DatePipe, NgFor, NgIf} from '@angular/common';
import {CardComponent} from '../../../widget-modules/components/card/card.component';
import {MatButton} from '@angular/material/button';
import {UserNameComponent} from '../../../services/user/user-name/user-name.component';
import {ShowTypePipe} from '../../../widget-modules/pipes/show-type-translater/show-type.pipe';
@Component({
selector: 'app-select',
templateUrl: './select.component.html',
styleUrls: ['./select.component.less'],
animations: [fade],
imports: [
NgIf,
CardComponent,
NgFor,
MatButton,
UserNameComponent,
AsyncPipe,
DatePipe,
ShowTypePipe,
],
selector: 'app-select',
templateUrl: './select.component.html',
styleUrls: ['./select.component.less'],
animations: [fade],
imports: [NgIf, CardComponent, NgFor, MatButton, UserNameComponent, AsyncPipe, DatePipe, ShowTypePipe],
})
export class SelectComponent implements OnInit {
public visible = false;
@@ -33,8 +24,11 @@ export class SelectComponent implements OnInit {
.list$(true)
.pipe(map(_ => _.filter(_ => _.date.toDate() > new Date(new Date().setMonth(new Date().getMonth() - 1))).sort((a, b) => (b.date < a.date ? -1 : b.date > a.date ? 1 : 0))));
public constructor(private showService: ShowService, private globalSettingsService: GlobalSettingsService, private router: Router) {
}
public constructor(
private showService: ShowService,
private globalSettingsService: GlobalSettingsService,
private router: Router
) {}
public async selectShow(show: Show) {
this.visible = false;

View File

@@ -3,5 +3,4 @@ import {Injectable} from '@angular/core';
@Injectable({
providedIn: 'root',
})
export class PresentationService {
}
export class PresentationService {}