aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/recommendations/recommended-videos.component.ts
diff options
context:
space:
mode:
authorJorropo <jorropo.pgm@gmail.com>2018-09-04 11:01:54 +0200
committerChocobozzz <me@florianbigard.com>2018-09-04 11:01:54 +0200
commitb0c36821d1dcf362f14c99ca3741e7d03aea0a04 (patch)
treeba2e84ae6f1559f9e3027feab0422e2bf5ad04a8 /client/src/app/videos/recommendations/recommended-videos.component.ts
parent5cf84858d49f4231cc4efec5e3132f17f65f6cf6 (diff)
downloadPeerTube-b0c36821d1dcf362f14c99ca3741e7d03aea0a04.tar.gz
PeerTube-b0c36821d1dcf362f14c99ca3741e7d03aea0a04.tar.zst
PeerTube-b0c36821d1dcf362f14c99ca3741e7d03aea0a04.zip
Add video recomandation by tags (#1001)
* Recommendation by tags (thx bradsk88) Thx bradsk88 for the help. * Prefer jest-preset-angular to skip need for babel config * Fix jest
Diffstat (limited to 'client/src/app/videos/recommendations/recommended-videos.component.ts')
-rw-r--r--client/src/app/videos/recommendations/recommended-videos.component.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/client/src/app/videos/recommendations/recommended-videos.component.ts b/client/src/app/videos/recommendations/recommended-videos.component.ts
index aa4dd0ee2..c6c1d9e5d 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, OnChanges } from '@angular/core' 1import { Component, Input, OnChanges } 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 { RecommendationInfo } from '@app/shared/video/recommendation-info.model'
4import { RecommendedVideosStore } from '@app/videos/recommendations/recommended-videos.store' 5import { RecommendedVideosStore } from '@app/videos/recommendations/recommended-videos.store'
5import { User } from '@app/shared' 6import { User } from '@app/shared'
6 7
@@ -9,7 +10,7 @@ import { User } from '@app/shared'
9 templateUrl: './recommended-videos.component.html' 10 templateUrl: './recommended-videos.component.html'
10}) 11})
11export class RecommendedVideosComponent implements OnChanges { 12export class RecommendedVideosComponent implements OnChanges {
12 @Input() inputVideo: Video 13 @Input() inputRecommendation: RecommendationInfo
13 @Input() user: User 14 @Input() user: User
14 15
15 readonly hasVideos$: Observable<boolean> 16 readonly hasVideos$: Observable<boolean>
@@ -23,8 +24,8 @@ export class RecommendedVideosComponent implements OnChanges {
23 } 24 }
24 25
25 public ngOnChanges (): void { 26 public ngOnChanges (): void {
26 if (this.inputVideo) { 27 if (this.inputRecommendation) {
27 this.store.requestNewRecommendations(this.inputVideo.uuid) 28 this.store.requestNewRecommendations(this.inputRecommendation)
28 } 29 }
29 } 30 }
30 31