error caught when database is empty

This commit is contained in:
Chneemann 2024-08-13 16:28:42 +02:00
parent 2c7fd7a9ca
commit d1417a5c67
2 changed files with 19 additions and 4 deletions

View file

@ -1,4 +1,6 @@
<section>
@if (currentMovie.length < 0) {
<!-- If at least one film has been uploaded -->
@if (playMovie === "") {
<app-header [browse]="true"></app-header>
<app-hero-banner
@ -21,10 +23,12 @@
</div>
</div>
<app-video-player [playMovie]="playMovie"></app-video-player>
<!-- <video width="100%" height="100%" controls autoplay>
<source src="{{ playMovie }}" type="video/mp4" />
Your browser does not support the video tag.
</video> -->
</div>
} } @else {
<!-- If the database is empty -->
<app-header [browse]="true"></app-header>
<div class="error">
<h2>Unfortunately there are no films available in the database.</h2>
</div>
}
</section>

View file

@ -67,3 +67,14 @@ section {
width: 32px;
height: auto;
}
.error {
display: flex;
justify-content: center;
position: fixed;
top: 120px;
left: 0;
right: 0;
padding: 24px;
text-align: center;
}