Add IMDb movie importer feature and unify header

Introduces a new movie importer feature allowing admins to search and import movies from IMDb, including new components for search, result display, and error handling. Replaces the schedule header with a reusable menu header component. Updates routing, navigation, and HTTP service to support the new importer. Adds a poster placeholder image and improves poster error handling.
This commit is contained in:
2025-11-07 01:57:42 +01:00
parent bd7a0ed9f1
commit 4f5a8e9661
25 changed files with 338 additions and 42 deletions

View File

@@ -1,5 +1,10 @@
<div class="w-64 mx-auto my-2">
<img [src]="movie().image" alt="Movie Poster" class="w-full h-auto shadow-md">
<img
[src]="movie().image && movie().image !== 'N/A' ? movie().image : 'assets/poster_placeholder.png'"
alt="Movie Poster"
class="w-full h-auto shadow-md rounded-md"
(error)="onPosterError($event)"
>
</div>
<div class="flex gap-1 justify-between">
<app-movie-rating [rating]="movie().rating"></app-movie-rating>

View File

@@ -9,4 +9,13 @@ import { Film } from '@infinimotion/model-frontend';
})
export class MoviePosterComponent {
movie = input.required<Film>();
onPosterError(event: Event) {
const img = event.target as HTMLImageElement;
const placeholder = 'assets/poster_placeholder.png';
if (img.src !== window.location.origin + placeholder) {
img.src = placeholder;
}
}
}