aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/recommendations
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/videos/recommendations')
-rw-r--r--client/src/app/videos/recommendations/recommended-videos.component.html8
-rw-r--r--client/src/app/videos/recommendations/recommended-videos.component.ts4
2 files changed, 8 insertions, 4 deletions
diff --git a/client/src/app/videos/recommendations/recommended-videos.component.html b/client/src/app/videos/recommendations/recommended-videos.component.html
index 5f223078a..c82642c1c 100644
--- a/client/src/app/videos/recommendations/recommended-videos.component.html
+++ b/client/src/app/videos/recommendations/recommended-videos.component.html
@@ -4,15 +4,17 @@
4 <div i18n class="title-page title-page-single"> 4 <div i18n class="title-page title-page-single">
5 Other videos 5 Other videos
6 </div> 6 </div>
7 <div class="d-flex title-page-autoplay"> 7 <div *ngIf="!playlist" class="d-flex title-page-autoplay">
8 <span>Autoplay</span> 8 <span i18n>Autoplay</span>
9 <p-inputSwitch [(ngModel)]="autoPlayNextVideo" (ngModelChange)="switchAutoPlayNextVideo()"></p-inputSwitch> 9 <p-inputSwitch [(ngModel)]="autoPlayNextVideo" (ngModelChange)="switchAutoPlayNextVideo()"></p-inputSwitch>
10 </div> 10 </div>
11 </div> 11 </div>
12 12
13 <div *ngFor="let video of (videos$ | async)"> 13 <div *ngFor="let video of (videos$ | async); let i = index; let length = count">
14 <my-video-miniature [video]="video" [user]="user" (videoBlacklisted)="onVideoRemoved()" (videoRemoved)="onVideoRemoved()"> 14 <my-video-miniature [video]="video" [user]="user" (videoBlacklisted)="onVideoRemoved()" (videoRemoved)="onVideoRemoved()">
15 </my-video-miniature> 15 </my-video-miniature>
16
17 <hr *ngIf="!playlist && i == 0 && length > 1" />
16 </div> 18 </div>
17 </ng-container> 19 </ng-container>
18</div> 20</div>
diff --git a/client/src/app/videos/recommendations/recommended-videos.component.ts b/client/src/app/videos/recommendations/recommended-videos.component.ts
index 4c3cde225..771ae54a2 100644
--- a/client/src/app/videos/recommendations/recommended-videos.component.ts
+++ b/client/src/app/videos/recommendations/recommended-videos.component.ts
@@ -1,6 +1,7 @@
1import { Component, Input, Output, OnChanges, EventEmitter } from '@angular/core' 1import { Component, Input, Output, OnChanges, EventEmitter } from '@angular/core'
2import { Observable } from 'rxjs' 2import { Observable } from 'rxjs'
3import { Video } from '@app/shared/video/video.model' 3import { Video } from '@app/shared/video/video.model'
4import { VideoPlaylist } from '@app/shared/video-playlist/video-playlist.model'
4import { RecommendationInfo } from '@app/shared/video/recommendation-info.model' 5import { RecommendationInfo } from '@app/shared/video/recommendation-info.model'
5import { RecommendedVideosStore } from '@app/videos/recommendations/recommended-videos.store' 6import { RecommendedVideosStore } from '@app/videos/recommendations/recommended-videos.store'
6import { User } from '@app/shared' 7import { User } from '@app/shared'
@@ -14,10 +15,11 @@ import { peertubeLocalStorage } from '@app/shared/misc/peertube-local-storage'
14 styleUrls: [ './recommended-videos.component.scss' ] 15 styleUrls: [ './recommended-videos.component.scss' ]
15}) 16})
16export class RecommendedVideosComponent implements OnChanges { 17export class RecommendedVideosComponent implements OnChanges {
17 private static LOCAL_STORAGE_AUTO_PLAY_NEXT_VIDEO = 'auto_play_next_video' 18 static LOCAL_STORAGE_AUTO_PLAY_NEXT_VIDEO = 'auto_play_next_video'
18 19
19 @Input() inputRecommendation: RecommendationInfo 20 @Input() inputRecommendation: RecommendationInfo
20 @Input() user: User 21 @Input() user: User
22 @Input() playlist: VideoPlaylist
21 @Output() gotRecommendations = new EventEmitter<Video[]>() 23 @Output() gotRecommendations = new EventEmitter<Video[]>()
22 24
23 readonly hasVideos$: Observable<boolean> 25 readonly hasVideos$: Observable<boolean>