auto migrate standalone components

This commit is contained in:
2025-01-05 10:26:35 +01:00
parent 8b8395fc3c
commit 54ee9a5b11
121 changed files with 947 additions and 685 deletions

View File

@@ -9,8 +9,8 @@ describe('LegalComponent', () => {
beforeEach(
waitForAsync(() => {
void TestBed.configureTestingModule({
declarations: [LegalComponent],
}).compileComponents();
imports: [LegalComponent],
}).compileComponents();
}),
);

View File

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

View File

@@ -9,8 +9,8 @@ describe('LogoComponent', () => {
beforeEach(
waitForAsync(() => {
void TestBed.configureTestingModule({
declarations: [LogoComponent],
}).compileComponents();
imports: [LogoComponent],
}).compileComponents();
}),
);

View File

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

View File

@@ -9,8 +9,8 @@ describe('MonitorComponent', () => {
beforeEach(
waitForAsync(() => {
void TestBed.configureTestingModule({
declarations: [MonitorComponent],
}).compileComponents();
imports: [MonitorComponent],
}).compileComponents();
}),
);

View File

@@ -13,13 +13,26 @@ 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';
@Component({
selector: 'app-monitor',
templateUrl: './monitor.component.html',
styleUrls: ['./monitor.component.less'],
animations: [songSwitch],
standalone: false,
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;

View File

@@ -4,7 +4,7 @@ import {CommonModule} from '@angular/common';
import {PresentationRoutingModule} from './presentation-routing.module';
import {MonitorComponent} from './monitor/monitor.component';
import {RemoteComponent} from './remote/remote.component';
import {CardModule} from '../../widget-modules/components/card/card.module';
import {MatFormFieldModule} from '@angular/material/form-field';
import {MatSelectModule} from '@angular/material/select';
import {LegalComponent} from './monitor/legal/legal.component';
@@ -15,19 +15,17 @@ import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {LogoComponent} from './monitor/logo/logo.component';
import {SelectComponent} from './select/select.component';
import {MatInputModule} from '@angular/material/input';
import {UserNameModule} from '../../services/user/user-name/user-name.module';
import {SongTextComponent} from '../../widget-modules/components/song-text/song-text.component';
import {AddSongComponent} from '../../widget-modules/components/add-song/add-song.component';
import {SectionTypePipe} from '../../widget-modules/pipes/section-type-translator/section-type.pipe';
import {ShowTypePipe} from '../../widget-modules/pipes/show-type-translater/show-type.pipe';
@NgModule({
declarations: [MonitorComponent, RemoteComponent, LegalComponent, LogoComponent, SelectComponent],
exports: [RemoteComponent],
imports: [
exports: [RemoteComponent],
imports: [
CommonModule,
PresentationRoutingModule,
CardModule,
MatFormFieldModule,
MatSelectModule,
ShowTypePipe,
@@ -40,7 +38,7 @@ import {ShowTypePipe} from '../../widget-modules/pipes/show-type-translater/show
AddSongComponent,
ReactiveFormsModule,
MatInputModule,
UserNameModule,
],
MonitorComponent, RemoteComponent, LegalComponent, LogoComponent, SelectComponent,
],
})
export class PresentationModule {}

View File

@@ -9,8 +9,8 @@ describe('RemoteComponent', () => {
beforeEach(
waitForAsync(() => {
void TestBed.configureTestingModule({
declarations: [RemoteComponent],
}).compileComponents();
imports: [RemoteComponent],
}).compileComponents();
}),
);

View File

@@ -13,6 +13,20 @@ 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';
export interface PresentationSong {
id: string;
@@ -21,12 +35,33 @@ export interface PresentationSong {
}
@Component({
selector: 'app-remote',
templateUrl: './remote.component.html',
styleUrls: ['./remote.component.less'],
animations: [fade],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
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;

View File

@@ -5,13 +5,27 @@ 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';
@Component({
selector: 'app-select',
templateUrl: './select.component.html',
styleUrls: ['./select.component.less'],
animations: [fade],
standalone: false,
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;