From c2caa99b942dea7fa9d2856f53efd1316169658e Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Mon, 8 Jun 2020 08:52:06 +0200 Subject: 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 --- client/src/app/shared/video/abstract-video-list.ts | 1 + .../shared/video/video-miniature.component.html | 44 ++++++++++++---------- .../app/shared/video/video-miniature.component.ts | 2 + 3 files changed, 28 insertions(+), 19 deletions(-) (limited to 'client/src/app/shared/video') diff --git a/client/src/app/shared/video/abstract-video-list.ts b/client/src/app/shared/video/abstract-video-list.ts index b146d7014..69d5c0010 100644 --- a/client/src/app/shared/video/abstract-video-list.ts +++ b/client/src/app/shared/video/abstract-video-list.ts @@ -56,6 +56,7 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy, DisableFor date: true, views: true, by: true, + avatar: true, privacyLabel: true, privacyText: false, state: false, diff --git a/client/src/app/shared/video/video-miniature.component.html b/client/src/app/shared/video/video-miniature.component.html index 8e948ce42..c9ac97762 100644 --- a/client/src/app/shared/video/video-miniature.component.html +++ b/client/src/app/shared/video/video-miniature.component.html @@ -15,26 +15,32 @@ [routerLink]="[ '/videos/watch', video.uuid ]" [attr.title]="video.name" [ngClass]="{ 'blur-filter': isVideoBlur }" >{{ video.name }} - - +
+ - - - {video.views, plural, =1 {1 view} other {{{ video.views | myNumberFormatter }} views}} - - - - - - {{ video.byVideoChannel }} - - -
- {{ video.privacy.label }} - - - {{ getStateLabel(video) }} +
+ + + + + + {video.views, plural, =1 {1 view} other {{{ video.views | myNumberFormatter }} views}} + + + + + + {{ video.byVideoChannel }} + + +
+ {{ video.privacy.label }} + - + {{ getStateLabel(video) }} +
+
diff --git a/client/src/app/shared/video/video-miniature.component.ts b/client/src/app/shared/video/video-miniature.component.ts index 72b652448..88b21b3a5 100644 --- a/client/src/app/shared/video/video-miniature.component.ts +++ b/client/src/app/shared/video/video-miniature.component.ts @@ -24,6 +24,7 @@ export type MiniatureDisplayOptions = { date?: boolean views?: boolean by?: boolean + avatar?: boolean privacyLabel?: boolean privacyText?: boolean state?: boolean @@ -46,6 +47,7 @@ export class VideoMiniatureComponent implements OnInit { date: true, views: true, by: true, + avatar: false, privacyLabel: false, privacyText: false, state: false, -- cgit v1.2.3