diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2020-04-11 14:47:13 +0200 |
---|---|---|
committer | Rigel Kent <sendmemail@rigelk.eu> | 2020-04-11 16:05:50 +0200 |
commit | 62eacb420945020d354037c5d5cdf2885529f52a (patch) | |
tree | e8697b250b2f81e56b722018bcd0c958c1206c06 /client/src/app | |
parent | 58e1765affe6206fcae797290e4f5d8460dffea9 (diff) | |
download | PeerTube-62eacb420945020d354037c5d5cdf2885529f52a.tar.gz PeerTube-62eacb420945020d354037c5d5cdf2885529f52a.tar.zst PeerTube-62eacb420945020d354037c5d5cdf2885529f52a.zip |
Place private/unlisted labels in thumbnail instead of miniature
Diffstat (limited to 'client/src/app')
3 files changed, 18 insertions, 6 deletions
diff --git a/client/src/app/shared/video/video-miniature.component.html b/client/src/app/shared/video/video-miniature.component.html index 6a8558de3..8e948ce42 100644 --- a/client/src/app/shared/video/video-miniature.component.html +++ b/client/src/app/shared/video/video-miniature.component.html | |||
@@ -2,7 +2,10 @@ | |||
2 | <my-video-thumbnail | 2 | <my-video-thumbnail |
3 | [video]="video" [nsfw]="isVideoBlur" | 3 | [video]="video" [nsfw]="isVideoBlur" |
4 | [displayWatchLaterPlaylist]="isWatchLaterPlaylistDisplayed()" [inWatchLaterPlaylist]="inWatchLaterPlaylist" (watchLaterClick)="onWatchLaterClick($event)" | 4 | [displayWatchLaterPlaylist]="isWatchLaterPlaylistDisplayed()" [inWatchLaterPlaylist]="inWatchLaterPlaylist" (watchLaterClick)="onWatchLaterClick($event)" |
5 | ></my-video-thumbnail> | 5 | > |
6 | <ng-container ngProjectAs="label-warning" *ngIf="displayOptions.privacyLabel && isUnlistedVideo()" i18n>Unlisted</ng-container> | ||
7 | <ng-container ngProjectAs="label-danger" *ngIf="displayOptions.privacyLabel && isPrivateVideo()" i18n>Private</ng-container> | ||
8 | </my-video-thumbnail> | ||
6 | 9 | ||
7 | <div class="video-bottom"> | 10 | <div class="video-bottom"> |
8 | <div class="video-miniature-information"> | 11 | <div class="video-miniature-information"> |
@@ -19,11 +22,6 @@ | |||
19 | <ng-container *ngIf="displayOptions.date && displayOptions.views"> • </ng-container> | 22 | <ng-container *ngIf="displayOptions.date && displayOptions.views"> • </ng-container> |
20 | <ng-container i18n *ngIf="displayOptions.views">{video.views, plural, =1 {1 view} other {{{ video.views | myNumberFormatter }} views}}</ng-container> | 23 | <ng-container i18n *ngIf="displayOptions.views">{video.views, plural, =1 {1 view} other {{{ video.views | myNumberFormatter }} views}}</ng-container> |
21 | </span> | 24 | </span> |
22 | |||
23 | <ng-container *ngIf="displayOptions.privacyLabel"> | ||
24 | <span *ngIf="isUnlistedVideo()" class="badge badge-warning ml-1" i18n>Unlisted</span> | ||
25 | <span *ngIf="isPrivateVideo()" class="badge badge-danger ml-1" i18n>Private</span> | ||
26 | </ng-container> | ||
27 | </span> | 25 | </span> |
28 | 26 | ||
29 | <a tabindex="-1" *ngIf="displayOptions.by && displayOwnerAccount()" class="video-miniature-account" [routerLink]="[ '/accounts', video.byAccount ]"> | 27 | <a tabindex="-1" *ngIf="displayOptions.by && displayOwnerAccount()" class="video-miniature-account" [routerLink]="[ '/accounts', video.byAccount ]"> |
diff --git a/client/src/app/shared/video/video-thumbnail.component.html b/client/src/app/shared/video/video-thumbnail.component.html index 3152161bf..fe5510c56 100644 --- a/client/src/app/shared/video/video-thumbnail.component.html +++ b/client/src/app/shared/video/video-thumbnail.component.html | |||
@@ -18,6 +18,9 @@ | |||
18 | </ng-container> | 18 | </ng-container> |
19 | </div> | 19 | </div> |
20 | 20 | ||
21 | <div class="video-thumbnail-label-overlay warning"><ng-content select="label-warning"></ng-content></div> | ||
22 | <div class="video-thumbnail-label-overlay danger"><ng-content select="label-danger"></ng-content></div> | ||
23 | |||
21 | <div class="video-thumbnail-duration-overlay">{{ video.durationLabel }}</div> | 24 | <div class="video-thumbnail-duration-overlay">{{ video.durationLabel }}</div> |
22 | 25 | ||
23 | <div class="play-overlay"> | 26 | <div class="play-overlay"> |
diff --git a/client/src/app/shared/video/video-thumbnail.component.scss b/client/src/app/shared/video/video-thumbnail.component.scss index c13105e94..5fca916f0 100644 --- a/client/src/app/shared/video/video-thumbnail.component.scss +++ b/client/src/app/shared/video/video-thumbnail.component.scss | |||
@@ -19,6 +19,7 @@ | |||
19 | } | 19 | } |
20 | 20 | ||
21 | .video-thumbnail-watch-later-overlay, | 21 | .video-thumbnail-watch-later-overlay, |
22 | .video-thumbnail-label-overlay, | ||
22 | .video-thumbnail-duration-overlay { | 23 | .video-thumbnail-duration-overlay { |
23 | @include static-thumbnail-overlay; | 24 | @include static-thumbnail-overlay; |
24 | 25 | ||
@@ -28,6 +29,16 @@ | |||
28 | z-index: z(miniature); | 29 | z-index: z(miniature); |
29 | } | 30 | } |
30 | 31 | ||
32 | .video-thumbnail-label-overlay { | ||
33 | position: absolute; | ||
34 | padding: 0 5px; | ||
35 | left: 5px; | ||
36 | top: 5px; | ||
37 | |||
38 | &.warning { background-color: orange; } | ||
39 | &.danger { background-color: red; } | ||
40 | } | ||
41 | |||
31 | .video-thumbnail-duration-overlay { | 42 | .video-thumbnail-duration-overlay { |
32 | position: absolute; | 43 | position: absolute; |
33 | padding: 0 5px; | 44 | padding: 0 5px; |