Verified Commit 62eacb42 authored by Rigel Kent's avatar Rigel Kent
Browse files

Place private/unlisted labels in thumbnail instead of miniature

parent 58e1765a
......@@ -2,7 +2,10 @@
<my-video-thumbnail
[video]="video" [nsfw]="isVideoBlur"
[displayWatchLaterPlaylist]="isWatchLaterPlaylistDisplayed()" [inWatchLaterPlaylist]="inWatchLaterPlaylist" (watchLaterClick)="onWatchLaterClick($event)"
></my-video-thumbnail>
>
<ng-container ngProjectAs="label-warning" *ngIf="displayOptions.privacyLabel && isUnlistedVideo()" i18n>Unlisted</ng-container>
<ng-container ngProjectAs="label-danger" *ngIf="displayOptions.privacyLabel && isPrivateVideo()" i18n>Private</ng-container>
</my-video-thumbnail>
<div class="video-bottom">
<div class="video-miniature-information">
......@@ -19,11 +22,6 @@
<ng-container *ngIf="displayOptions.date && displayOptions.views"></ng-container>
<ng-container i18n *ngIf="displayOptions.views">{video.views, plural, =1 {1 view} other {{{ video.views | myNumberFormatter }} views}}</ng-container>
</span>
<ng-container *ngIf="displayOptions.privacyLabel">
<span *ngIf="isUnlistedVideo()" class="badge badge-warning ml-1" i18n>Unlisted</span>
<span *ngIf="isPrivateVideo()" class="badge badge-danger ml-1" i18n>Private</span>
</ng-container>
</span>
<a tabindex="-1" *ngIf="displayOptions.by && displayOwnerAccount()" class="video-miniature-account" [routerLink]="[ '/accounts', video.byAccount ]">
......
......@@ -18,6 +18,9 @@
</ng-container>
</div>
<div class="video-thumbnail-label-overlay warning"><ng-content select="label-warning"></ng-content></div>
<div class="video-thumbnail-label-overlay danger"><ng-content select="label-danger"></ng-content></div>
<div class="video-thumbnail-duration-overlay">{{ video.durationLabel }}</div>
<div class="play-overlay">
......
......@@ -19,6 +19,7 @@
}
.video-thumbnail-watch-later-overlay,
.video-thumbnail-label-overlay,
.video-thumbnail-duration-overlay {
@include static-thumbnail-overlay;
......@@ -28,6 +29,16 @@
z-index: z(miniature);
}
.video-thumbnail-label-overlay {
position: absolute;
padding: 0 5px;
left: 5px;
top: 5px;
&.warning { background-color: orange; }
&.danger { background-color: red; }
}
.video-thumbnail-duration-overlay {
position: absolute;
padding: 0 5px;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment