]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Added label on the next autoplayed video and hide the hr line if unnecessary (#4497)
authorFlorian CUNY <poslovitch@bentobox.world>
Tue, 26 Oct 2021 15:15:12 +0000 (17:15 +0200)
committerGitHub <noreply@github.com>
Tue, 26 Oct 2021 15:15:12 +0000 (17:15 +0200)
* 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

client/src/app/+videos/+video-watch/shared/recommendations/recommended-videos.component.html
client/src/app/+videos/+video-watch/shared/recommendations/recommended-videos.component.scss

index bbfcab2aee7243e7337b78e75c63c326c92f2c96..e493ad8d7cf6b7b9fdc7ed81176ad446276a4c29 100644 (file)
@@ -13,6 +13,7 @@
     </div>
 
     <ng-container *ngFor="let video of (videos$ | async); let i = index; let length = count">
+      <span i18n *ngIf="!playlist && i === 0 && length !== 0 && autoPlayNextVideo" class="title-page-next-video-label">Next video to be played</span>
       <my-video-miniature
         [displayOptions]="displayOptions" [video]="video" [user]="userMiniature" [displayAsRow]="displayAsRow"
         (videoBlocked)="onVideoRemoved()" (videoRemoved)="onVideoRemoved()" (videoAccountMuted)="onVideoRemoved()"
@@ -20,7 +21,7 @@
       >
       </my-video-miniature>
 
-      <hr *ngIf="!playlist && i === 0 && length > 1" />
+      <hr *ngIf="!playlist && i === 0 && length > 1 && autoPlayNextVideo" />
     </ng-container>
   </ng-container>
 </div>
index 84ed25ae8c3e4f9db36c7cd378a4c8b3575da725..784d0e9617219484d8a9e2cf78dd571261971950 100644 (file)
   }
 }
 
+.title-page-next-video-label {
+  display: block;
+  margin-bottom: 5px;
+  font-weight: $font-semibold;
+}
+
 hr {
   margin-top: 0;
 }