aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/recommendations
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2020-06-08 08:52:06 +0200
committerGitHub <noreply@github.com>2020-06-08 08:52:06 +0200
commitc2caa99b942dea7fa9d2856f53efd1316169658e (patch)
tree76dfa301d6fef72f6bdab38b2bf33bbac7cdb5b6 /client/src/app/videos/recommendations
parentc87d45df9b2f0d018d866d096c45ab70269105a5 (diff)
downloadPeerTube-c2caa99b942dea7fa9d2856f53efd1316169658e.tar.gz
PeerTube-c2caa99b942dea7fa9d2856f53efd1316169658e.tar.zst
PeerTube-c2caa99b942dea7fa9d2856f53efd1316169658e.zip
Add channel/account avatars in miniature (#2838)
* add small avatar to miniature * fix svg size for trending and search icons in plugins view * parametrize avatar in miniature display options
Diffstat (limited to 'client/src/app/videos/recommendations')
-rw-r--r--client/src/app/videos/recommendations/recommended-videos.component.html2
-rw-r--r--client/src/app/videos/recommendations/recommended-videos.component.ts8
2 files changed, 9 insertions, 1 deletions
diff --git a/client/src/app/videos/recommendations/recommended-videos.component.html b/client/src/app/videos/recommendations/recommended-videos.component.html
index 74f9ed2a5..c6bdfee46 100644
--- a/client/src/app/videos/recommendations/recommended-videos.component.html
+++ b/client/src/app/videos/recommendations/recommended-videos.component.html
@@ -13,7 +13,7 @@
13 </div> 13 </div>
14 14
15 <div *ngFor="let video of (videos$ | async); let i = index; let length = count"> 15 <div *ngFor="let video of (videos$ | async); let i = index; let length = count">
16 <my-video-miniature [video]="video" [user]="user" (videoBlacklisted)="onVideoRemoved()" (videoRemoved)="onVideoRemoved()"> 16 <my-video-miniature [displayOptions]="displayOptions" [video]="video" [user]="user" (videoBlacklisted)="onVideoRemoved()" (videoRemoved)="onVideoRemoved()">
17 </my-video-miniature> 17 </my-video-miniature>
18 18
19 <hr *ngIf="!playlist && i == 0 && length > 1" /> 19 <hr *ngIf="!playlist && i == 0 && length > 1" />
diff --git a/client/src/app/videos/recommendations/recommended-videos.component.ts b/client/src/app/videos/recommendations/recommended-videos.component.ts
index d4b4c929b..d4a5df19a 100644
--- a/client/src/app/videos/recommendations/recommended-videos.component.ts
+++ b/client/src/app/videos/recommendations/recommended-videos.component.ts
@@ -9,6 +9,7 @@ import { AuthService, Notifier } from '@app/core'
9import { UserService } from '@app/shared/users/user.service' 9import { UserService } from '@app/shared/users/user.service'
10import { I18n } from '@ngx-translate/i18n-polyfill' 10import { I18n } from '@ngx-translate/i18n-polyfill'
11import { SessionStorageService } from '@app/shared/misc/storage.service' 11import { SessionStorageService } from '@app/shared/misc/storage.service'
12import { MiniatureDisplayOptions } from '@app/shared/video/video-miniature.component'
12 13
13@Component({ 14@Component({
14 selector: 'my-recommended-videos', 15 selector: 'my-recommended-videos',
@@ -24,6 +25,13 @@ export class RecommendedVideosComponent implements OnChanges {
24 autoPlayNextVideo: boolean 25 autoPlayNextVideo: boolean
25 autoPlayNextVideoTooltip: string 26 autoPlayNextVideoTooltip: string
26 27
28 displayOptions: MiniatureDisplayOptions = {
29 date: true,
30 views: true,
31 by: true,
32 avatar: true
33 }
34
27 readonly hasVideos$: Observable<boolean> 35 readonly hasVideos$: Observable<boolean>
28 readonly videos$: Observable<Video[]> 36 readonly videos$: Observable<Video[]>
29 37