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>
|
||||
@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>
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue