migrate angular 21

This commit is contained in:
2026-03-09 22:43:40 +01:00
parent 0203d4ea9d
commit 26c99a0dae
65 changed files with 19188 additions and 16946 deletions

View File

@@ -1,25 +1,28 @@
<div *ngIf="show$|async as show" class="page">
<div class="title">
<div class="left">{{ show.showType|showType }}</div>
<div class="right">{{ show.date.toDate() | date: 'dd.MM.yyyy' }}</div>
@if (show$|async; as show) {
<div class="page">
<div class="title">
<div class="left">{{ show.showType|showType }}</div>
<div class="right">{{ show.date.toDate() | date: 'dd.MM.yyyy' }}</div>
</div>
<div class="view">
<swiper-container scrollbar="true">
@for (song of show.songs; track trackBy(i, song); let i = $index) {
<swiper-slide
class="song-swipe">
<div class="song-title">{{ song.title }}</div>
<div class="legal">
@if (song.artist) {
<p>{{ song.artist }}</p>
}
</div>
<app-song-text
[text]="song.text"
></app-song-text>
</swiper-slide>
}
</swiper-container>
</div>
</div>
<div class="view">
<swiper-container scrollbar="true">
<swiper-slide *ngFor="let song of show.songs; let i = index; trackBy: trackBy"
class="song-swipe">
<div class="song-title">{{ song.title }}</div>
<div class="legal">
<p *ngIf="song.artist">{{ song.artist }}</p>
</div>
<app-song-text
[text]="song.text"
></app-song-text>
</swiper-slide>
</swiper-container>
</div>
</div>
}

View File

@@ -4,7 +4,7 @@ import {ActivatedRoute} from '@angular/router';
import {map, switchMap} from 'rxjs/operators';
import {Song} from '../songs/services/song';
import {ConfigService} from '../../services/config.service';
import {AsyncPipe, DatePipe, NgFor, NgIf} from '@angular/common';
import {AsyncPipe, DatePipe} from '@angular/common';
import {SongTextComponent} from '../../widget-modules/components/song-text/song-text.component';
import {ShowTypePipe} from '../../widget-modules/pipes/show-type-translater/show-type.pipe';
@@ -13,7 +13,7 @@ import {ShowTypePipe} from '../../widget-modules/pipes/show-type-translater/show
templateUrl: './guest.component.html',
styleUrls: ['./guest.component.less'],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [NgIf, NgFor, SongTextComponent, AsyncPipe, DatePipe, ShowTypePipe],
imports: [SongTextComponent, AsyncPipe, DatePipe, ShowTypePipe],
})
export class GuestComponent {
public show$ = this.currentRoute.params.pipe(