From aad61bfb432b3d5b2918912b296cfce14143e146 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Sun, 19 Apr 2020 15:03:05 +0200 Subject: [PATCH] Finishing the basic metadata edit for shows --- .../metadata-edit/metadata-edit.component.html | 17 ++++++++++++++--- .../metadata-edit/metadata-edit.component.ts | 18 ++++++++++++++++-- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/src/app/metadata-edit/metadata-edit.component.html b/src/app/metadata-edit/metadata-edit.component.html index 9eecc1a0..49c98cec 100644 --- a/src/app/metadata-edit/metadata-edit.component.html +++ b/src/app/metadata-edit/metadata-edit.component.html @@ -5,6 +5,17 @@ Title + + + Aliases + + + {{alias}} + cancel + + + + Overview @@ -52,10 +63,10 @@ Studio - - - + + {{studio.name}} diff --git a/src/app/metadata-edit/metadata-edit.component.ts b/src/app/metadata-edit/metadata-edit.component.ts index a585648e..da2602d2 100644 --- a/src/app/metadata-edit/metadata-edit.component.ts +++ b/src/app/metadata-edit/metadata-edit.component.ts @@ -43,6 +43,22 @@ export class MetadataEditComponent implements OnInit this.dialogRef.close(this.show); }); } + + addAlias(event: MatChipInputEvent) + { + const input = event.input; + const value = event.value; + + this.show.aliases.push(value); + if (input) + input.value = ""; + } + + removeAlias(alias: string) + { + const i = this.show.aliases.indexOf(alias); + this.show.aliases.splice(i, 1); + } addGenre(event: MatChipInputEvent) { @@ -57,8 +73,6 @@ export class MetadataEditComponent implements OnInit removeGenre(genre: Genre): void { - console.log("Removing a genre"); - console.log(genre); const i = this.show.genres.indexOf(genre); this.show.genres.splice(i, 1); }