error caught when database is empty
This commit is contained in:
parent
2c7fd7a9ca
commit
d1417a5c67
2 changed files with 19 additions and 4 deletions
|
|
@ -1,4 +1,6 @@
|
||||||
<section>
|
<section>
|
||||||
|
@if (currentMovie.length < 0) {
|
||||||
|
<!-- If at least one film has been uploaded -->
|
||||||
@if (playMovie === "") {
|
@if (playMovie === "") {
|
||||||
<app-header [browse]="true"></app-header>
|
<app-header [browse]="true"></app-header>
|
||||||
<app-hero-banner
|
<app-hero-banner
|
||||||
|
|
@ -21,10 +23,12 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<app-video-player [playMovie]="playMovie"></app-video-player>
|
<app-video-player [playMovie]="playMovie"></app-video-player>
|
||||||
<!-- <video width="100%" height="100%" controls autoplay>
|
</div>
|
||||||
<source src="{{ playMovie }}" type="video/mp4" />
|
} } @else {
|
||||||
Your browser does not support the video tag.
|
<!-- If the database is empty -->
|
||||||
</video> -->
|
<app-header [browse]="true"></app-header>
|
||||||
|
<div class="error">
|
||||||
|
<h2>Unfortunately there are no films available in the database.</h2>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
</section>
|
</section>
|
||||||
|
|
|
||||||
|
|
@ -67,3 +67,14 @@ section {
|
||||||
width: 32px;
|
width: 32px;
|
||||||
height: auto;
|
height: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.error {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
position: fixed;
|
||||||
|
top: 120px;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
padding: 24px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue