Add no result text if there are no results

This commit is contained in:
Chocobozzz 2017-12-21 11:08:46 +01:00
parent e91890011e
commit 6e33bf2882
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
4 changed files with 25 additions and 7 deletions

View File

@ -1,3 +1,5 @@
<div *ngIf="pagination.totalItems === 0">No results.</div>
<div <div
class="videos" class="videos"
infiniteScroll infiniteScroll

View File

@ -3,6 +3,8 @@
{{ titlePage }} {{ titlePage }}
</div> </div>
<div *ngIf="pagination.totalItems === 0">No results.</div>
<div <div
class="videos" class="videos"
infiniteScroll infiniteScroll

View File

@ -13,12 +13,16 @@
<div class="video-info-name">{{ video.name }}</div> <div class="video-info-name">{{ video.name }}</div>
<div class="video-info-actions"> <div class="video-info-actions">
<div *ngIf="isUserLoggedIn()" [ngClass]="{ 'activated': userRating === 'like' }" class="action-button"> <div
<span class="icon icon-like" title="Like this video" (click)="setLike()"></span> *ngIf="isUserLoggedIn()" [ngClass]="{ 'activated': userRating === 'like' }" (click)="setLike()"
class="action-button action-button-like">
<span class="icon icon-like" title="Like this video" ></span>
</div> </div>
<div *ngIf="isUserLoggedIn()" [ngClass]="{ 'activated': userRating === 'dislike' }" class="action-button"> <div
<span class="icon icon-dislike" title="Dislike this video" (click)="setDislike()"></span> *ngIf="isUserLoggedIn()" [ngClass]="{ 'activated': userRating === 'dislike' }" (click)="setDislike()"
class="action-button action-button-dislike">
<span class="icon icon-dislike" title="Dislike this video"></span>
</div> </div>
<div (click)="showShareModal()" class="action-button"> <div (click)="showShareModal()" class="action-button">

View File

@ -51,6 +51,12 @@
.video-info-actions { .video-info-actions {
min-width: 215px; min-width: 215px;
display: flex;
justify-content: end;
.action-button:not(:first-child), .action-more {
margin-left: 10px;
}
.action-button { .action-button {
@include peertube-button; @include peertube-button;
@ -85,12 +91,16 @@
} }
} }
&.activated { &.action-button-like.activated {
@include orange-button; background-color: #39CC0B;
.icon-like { .icon-like {
background-image: url('../../../assets/images/video/like-white.svg'); background-image: url('../../../assets/images/video/like-white.svg');
} }
}
&.action-button-dislike.activated {
background-color: #FF0000;
.icon-dislike { .icon-dislike {
background-image: url('../../../assets/images/video/dislike-white.svg'); background-image: url('../../../assets/images/video/dislike-white.svg');
@ -222,7 +232,7 @@
} }
@media screen and (max-width: 1200px) { @media screen and (max-width: 1300px) {
.other-videos { .other-videos {
display: none; display: none;
} }