diff options
author | Florian CUNY <poslovitch@bentobox.world> | 2021-10-26 17:15:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-26 17:15:12 +0200 |
commit | db581cf7b99eb60d2e6d9bee5c020ef22b0a1a41 (patch) | |
tree | a9e963f6e1b4b99461308b07bf9c902a5a24666f /client/src | |
parent | 754b6f5f41bdc40aaaeefdb3c351666c305abe20 (diff) | |
download | PeerTube-db581cf7b99eb60d2e6d9bee5c020ef22b0a1a41.tar.gz PeerTube-db581cf7b99eb60d2e6d9bee5c020ef22b0a1a41.tar.zst PeerTube-db581cf7b99eb60d2e6d9bee5c020ef22b0a1a41.zip |
Added label on the next autoplayed video and hide the hr line if unnecessary (#4497)
* Added label on the next autoplayed video
Implements https://github.com/Chocobozzz/PeerTube/issues/4280
Also hid the hr line if autoplay is disabled
* Applied code suggestion
* Applied code suggestion
* Applied the last remaining code suggestion
Diffstat (limited to 'client/src')
2 files changed, 8 insertions, 1 deletions
diff --git a/client/src/app/+videos/+video-watch/shared/recommendations/recommended-videos.component.html b/client/src/app/+videos/+video-watch/shared/recommendations/recommended-videos.component.html index bbfcab2ae..e493ad8d7 100644 --- a/client/src/app/+videos/+video-watch/shared/recommendations/recommended-videos.component.html +++ b/client/src/app/+videos/+video-watch/shared/recommendations/recommended-videos.component.html | |||
@@ -13,6 +13,7 @@ | |||
13 | </div> | 13 | </div> |
14 | 14 | ||
15 | <ng-container *ngFor="let video of (videos$ | async); let i = index; let length = count"> | 15 | <ng-container *ngFor="let video of (videos$ | async); let i = index; let length = count"> |
16 | <span i18n *ngIf="!playlist && i === 0 && length !== 0 && autoPlayNextVideo" class="title-page-next-video-label">Next video to be played</span> | ||
16 | <my-video-miniature | 17 | <my-video-miniature |
17 | [displayOptions]="displayOptions" [video]="video" [user]="userMiniature" [displayAsRow]="displayAsRow" | 18 | [displayOptions]="displayOptions" [video]="video" [user]="userMiniature" [displayAsRow]="displayAsRow" |
18 | (videoBlocked)="onVideoRemoved()" (videoRemoved)="onVideoRemoved()" (videoAccountMuted)="onVideoRemoved()" | 19 | (videoBlocked)="onVideoRemoved()" (videoRemoved)="onVideoRemoved()" (videoAccountMuted)="onVideoRemoved()" |
@@ -20,7 +21,7 @@ | |||
20 | > | 21 | > |
21 | </my-video-miniature> | 22 | </my-video-miniature> |
22 | 23 | ||
23 | <hr *ngIf="!playlist && i === 0 && length > 1" /> | 24 | <hr *ngIf="!playlist && i === 0 && length > 1 && autoPlayNextVideo" /> |
24 | </ng-container> | 25 | </ng-container> |
25 | </ng-container> | 26 | </ng-container> |
26 | </div> | 27 | </div> |
diff --git a/client/src/app/+videos/+video-watch/shared/recommendations/recommended-videos.component.scss b/client/src/app/+videos/+video-watch/shared/recommendations/recommended-videos.component.scss index 84ed25ae8..784d0e961 100644 --- a/client/src/app/+videos/+video-watch/shared/recommendations/recommended-videos.component.scss +++ b/client/src/app/+videos/+video-watch/shared/recommendations/recommended-videos.component.scss | |||
@@ -37,6 +37,12 @@ | |||
37 | } | 37 | } |
38 | } | 38 | } |
39 | 39 | ||
40 | .title-page-next-video-label { | ||
41 | display: block; | ||
42 | margin-bottom: 5px; | ||
43 | font-weight: $font-semibold; | ||
44 | } | ||
45 | |||
40 | hr { | 46 | hr { |
41 | margin-top: 0; | 47 | margin-top: 0; |
42 | } | 48 | } |