update angular

This commit is contained in:
2025-01-02 15:01:59 +01:00
parent 73d3ecfd42
commit 802c309679
199 changed files with 13745 additions and 11691 deletions

View File

@@ -11,7 +11,7 @@
</div>
<div class="upload">
<label>
<input (change)="detectFiles($event)" type="file"/>
<input (change)="detectFiles($event)" type="file" />
</label>
<button

View File

@@ -11,7 +11,7 @@ describe('EditFileComponent', () => {
void TestBed.configureTestingModule({
declarations: [EditFileComponent],
}).compileComponents();
})
}),
);
beforeEach(() => {

View File

@@ -11,6 +11,7 @@ import {File} from '../../../services/file';
selector: 'app-edit-file',
templateUrl: './edit-file.component.html',
styleUrls: ['./edit-file.component.less'],
standalone: false,
})
export class EditFileComponent {
public selectedFiles: FileList | null = null;
@@ -22,7 +23,7 @@ export class EditFileComponent {
this.activatedRoute.params
.pipe(
map(param => param as {songId: string}),
map(param => param.songId)
map(param => param.songId),
)
.subscribe(songId => {
this.songId = songId;
@@ -31,7 +32,7 @@ export class EditFileComponent {
this.files$ = this.activatedRoute.params.pipe(
map(param => param as {songId: string}),
map(param => param.songId),
switchMap(songId => this.fileService.read$(songId))
switchMap(songId => this.fileService.read$(songId)),
);
}

View File

@@ -11,7 +11,7 @@ describe('FileComponent', () => {
void TestBed.configureTestingModule({
declarations: [FileComponent],
}).compileComponents();
})
}),
);
beforeEach(() => {

View File

@@ -8,6 +8,7 @@ import {FileService} from '../../../../services/file.service';
selector: 'app-file',
templateUrl: './file.component.html',
styleUrls: ['./file.component.less'],
standalone: false,
})
export class FileComponent {
public url$: Observable<string> | null = null;
@@ -17,7 +18,8 @@ export class FileComponent {
private fileId: string | null = null;
private path: string | null = null;
public constructor(private fileService: FileService) {}
public constructor(private fileService: FileService) {
}
@Input()
public set file(file: File) {

View File

@@ -11,7 +11,7 @@ export class EditSongGuard {
component: EditComponent,
currentRoute: ActivatedRouteSnapshot,
currentState: RouterStateSnapshot,
nextState: RouterStateSnapshot
nextState: RouterStateSnapshot,
): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {
return component.editSongComponent ? component.editSongComponent.askForSave(nextState) : true;
}

View File

@@ -2,7 +2,7 @@
<form [formGroup]="form" class="form">
<mat-form-field appearance="outline">
<mat-label>Titel</mat-label>
<input formControlName="title" matInput/>
<input formControlName="title" matInput />
</mat-form-field>
<div class="fourth">
@@ -10,28 +10,31 @@
<mat-label>Typ</mat-label>
<mat-select formControlName="type">
<mat-option *ngFor="let type of types" [value]="type">{{
type | songType
}}</mat-option>
type | songType
}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field appearance="outline">
<mat-label>Tonart</mat-label>
<mat-select formControlName="key">
<mat-option *ngFor="let key of keys" [value]="key">{{
key | key
}}</mat-option>
key | key
}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field appearance="outline">
<mat-label>Tempo</mat-label>
<input formControlName="tempo" matInput/>
<input formControlName="tempo" matInput />
</mat-form-field>
<mat-form-field appearance="outline">
<mat-label>Status</mat-label>
<mat-select formControlName="status">
<mat-option *ngFor="let status of status" [value]="status">{{
status | status
}}</mat-option>
status | status
}}
</mat-option>
</mat-select>
</mat-form-field>
</div>
@@ -119,8 +122,9 @@
<mat-label>Rechtlicher Status</mat-label>
<mat-select formControlName="legalType">
<mat-option *ngFor="let key of legalType" [value]="key">{{
key | legalType
}}</mat-option>
key | legalType
}}
</mat-option>
</mat-select>
</mat-form-field>
@@ -128,14 +132,15 @@
<mat-label>Rechteinhaber</mat-label>
<mat-select formControlName="legalOwner">
<mat-option *ngFor="let key of legalOwner" [value]="key">{{
key | legalOwner
}}</mat-option>
key | legalOwner
}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field appearance="outline">
<mat-label>Rechteinhaber ID (z.B. CCLI Liednummer)</mat-label>
<input formControlName="legalOwnerId" matInput/>
<input formControlName="legalOwnerId" matInput />
<a
*ngIf="form.value.legalOwner === 'CCLI'"
class="link-ccli"
@@ -153,22 +158,22 @@
<mat-form-field appearance="outline">
<mat-label>Künstler</mat-label>
<input formControlName="artist" matInput/>
<input formControlName="artist" matInput />
</mat-form-field>
<mat-form-field appearance="outline">
<mat-label>Verlag / Copyright</mat-label>
<input formControlName="label" matInput/>
<input formControlName="label" matInput />
</mat-form-field>
<mat-form-field appearance="outline">
<mat-label>Nutzungsbedingungen</mat-label>
<input formControlName="termsOfUse" matInput/>
<input formControlName="termsOfUse" matInput />
</mat-form-field>
<mat-form-field appearance="outline">
<mat-label>abweichende Quelle</mat-label>
<input formControlName="origin" matInput/>
<input formControlName="origin" matInput />
</mat-form-field>
</div>
</form>

View File

@@ -11,7 +11,7 @@ describe('EditSongComponent', () => {
void TestBed.configureTestingModule({
declarations: [EditSongComponent],
}).compileComponents();
})
}),
);
beforeEach(() => {

View File

@@ -16,6 +16,7 @@ import {SaveDialogComponent} from './save-dialog/save-dialog.component';
selector: 'app-edit-song',
templateUrl: './edit-song.component.html',
styleUrls: ['./edit-song.component.less'],
standalone: false,
})
export class EditSongComponent implements OnInit {
public song: Song | null = null;
@@ -37,8 +38,9 @@ export class EditSongComponent implements OnInit {
private songService: SongService,
private editService: EditService,
private router: Router,
public dialog: MatDialog
) {}
public dialog: MatDialog,
) {
}
public ngOnInit(): void {
this.activatedRoute.params
@@ -46,7 +48,7 @@ export class EditSongComponent implements OnInit {
map(param => param as {songId: string}),
map(param => param.songId),
switchMap(songId => this.songService.read$(songId)),
first()
first(),
)
.subscribe(song => {
this.song = song;

View File

@@ -11,7 +11,7 @@ describe('SaveDialogComponent', () => {
void TestBed.configureTestingModule({
declarations: [SaveDialogComponent],
}).compileComponents();
})
}),
);
beforeEach(() => {

View File

@@ -4,5 +4,7 @@ import {Component} from '@angular/core';
selector: 'app-save-dialog',
templateUrl: './save-dialog.component.html',
styleUrls: ['./save-dialog.component.less'],
standalone: false,
})
export class SaveDialogComponent {}
export class SaveDialogComponent {
}

View File

@@ -11,7 +11,7 @@ describe('EditComponent', () => {
void TestBed.configureTestingModule({
declarations: [EditComponent],
}).compileComponents();
})
}),
);
beforeEach(() => {

View File

@@ -5,6 +5,7 @@ import {EditSongComponent} from './edit-song/edit-song.component';
selector: 'app-edit',
templateUrl: './edit.component.html',
styleUrls: ['./edit.component.less'],
standalone: false,
})
export class EditComponent {
@ViewChild(EditSongComponent) public editSongComponent: EditSongComponent | null = null;

View File

@@ -2,7 +2,9 @@ import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {EditComponent} from './edit.component';
import {CardModule} from '../../../../widget-modules/components/card/card.module';
import {SongTypeTranslaterModule} from '../../../../widget-modules/pipes/song-type-translater/song-type-translater.module';
import {
SongTypeTranslaterModule,
} from '../../../../widget-modules/pipes/song-type-translater/song-type-translater.module';
import {ReactiveFormsModule} from '@angular/forms';
import {MatInputModule} from '@angular/material/input';
import {MatCheckboxModule} from '@angular/material/checkbox';
@@ -14,8 +16,12 @@ import {EditSongComponent} from './edit-song/edit-song.component';
import {EditFileComponent} from './edit-file/edit-file.component';
import {MatIconModule} from '@angular/material/icon';
import {FileComponent} from './edit-file/file/file.component';
import {LegalOwnerTranslatorModule} from '../../../../widget-modules/pipes/legal-owner-translator/legal-owner-translator.module';
import {LegalTypeTranslatorModule} from '../../../../widget-modules/pipes/legal-type-translator/legal-type-translator.module';
import {
LegalOwnerTranslatorModule,
} from '../../../../widget-modules/pipes/legal-owner-translator/legal-owner-translator.module';
import {
LegalTypeTranslatorModule,
} from '../../../../widget-modules/pipes/legal-type-translator/legal-type-translator.module';
import {KeyTranslatorModule} from '../../../../widget-modules/pipes/key-translator/key-translator.module';
import {MatChipsModule} from '@angular/material/chips';
import {FontAwesomeModule} from '@fortawesome/angular-fontawesome';
@@ -57,4 +63,5 @@ import {SongTextModule} from '../../../../widget-modules/components/song-text/so
SongTextModule,
],
})
export class EditModule {}
export class EditModule {
}

View File

@@ -11,7 +11,7 @@ describe('HistoryComponent', () => {
void TestBed.configureTestingModule({
declarations: [HistoryComponent],
}).compileComponents();
})
}),
);
beforeEach(() => {

View File

@@ -8,11 +8,13 @@ import {Song} from '../../../services/song';
selector: 'app-history',
templateUrl: './history.component.html',
styleUrls: ['./history.component.less'],
standalone: false,
})
export class HistoryComponent implements OnInit {
public song: Song | null = null;
public constructor(private activatedRoute: ActivatedRoute, private songService: SongService) {}
public constructor(private activatedRoute: ActivatedRoute, private songService: SongService) {
}
public ngOnInit(): void {
this.activatedRoute.params
@@ -20,7 +22,7 @@ export class HistoryComponent implements OnInit {
map(param => param as {songId: string}),
map(param => param.songId),
switchMap(songId => this.songService.read$(songId)),
first()
first(),
)
.subscribe(song => {
this.song = song;