diff options
author | Jorropo <jorropo.pgm@gmail.com> | 2018-09-04 11:01:54 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-09-04 11:01:54 +0200 |
commit | b0c36821d1dcf362f14c99ca3741e7d03aea0a04 (patch) | |
tree | ba2e84ae6f1559f9e3027feab0422e2bf5ad04a8 /client/src/app/videos/recommendations/recommended-videos.component.ts | |
parent | 5cf84858d49f4231cc4efec5e3132f17f65f6cf6 (diff) | |
download | PeerTube-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.ts | 7 |
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 @@ | |||
1 | import { Component, Input, OnChanges } from '@angular/core' | 1 | import { Component, Input, OnChanges } from '@angular/core' |
2 | import { Observable } from 'rxjs' | 2 | import { Observable } from 'rxjs' |
3 | import { Video } from '@app/shared/video/video.model' | 3 | import { Video } from '@app/shared/video/video.model' |
4 | import { RecommendationInfo } from '@app/shared/video/recommendation-info.model' | ||
4 | import { RecommendedVideosStore } from '@app/videos/recommendations/recommended-videos.store' | 5 | import { RecommendedVideosStore } from '@app/videos/recommendations/recommended-videos.store' |
5 | import { User } from '@app/shared' | 6 | import { 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 | }) |
11 | export class RecommendedVideosComponent implements OnChanges { | 12 | export 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 | ||