1
0
Fork 0

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
This commit is contained in:
Florian CUNY 2021-10-26 17:15:12 +02:00 committed by GitHub
parent 754b6f5f41
commit db581cf7b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View file

@ -13,6 +13,7 @@
</div> </div>
<ng-container *ngFor="let video of (videos$ | async); let i = index; let length = count"> <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 <my-video-miniature
[displayOptions]="displayOptions" [video]="video" [user]="userMiniature" [displayAsRow]="displayAsRow" [displayOptions]="displayOptions" [video]="video" [user]="userMiniature" [displayAsRow]="displayAsRow"
(videoBlocked)="onVideoRemoved()" (videoRemoved)="onVideoRemoved()" (videoAccountMuted)="onVideoRemoved()" (videoBlocked)="onVideoRemoved()" (videoRemoved)="onVideoRemoved()" (videoAccountMuted)="onVideoRemoved()"
@ -20,7 +21,7 @@
> >
</my-video-miniature> </my-video-miniature>
<hr *ngIf="!playlist && i === 0 && length > 1" /> <hr *ngIf="!playlist && i === 0 && length > 1 && autoPlayNextVideo" />
</ng-container> </ng-container>
</ng-container> </ng-container>
</div> </div>

View file

@ -37,6 +37,12 @@
} }
} }
.title-page-next-video-label {
display: block;
margin-bottom: 5px;
font-weight: $font-semibold;
}
hr { hr {
margin-top: 0; margin-top: 0;
} }