From 06ec4bdd15cdd1e938ec1744784cd2993aed9809 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 5 May 2021 09:44:24 +0200 Subject: Fix miniature avatar size --- .../+video-watch/recommendations/recommended-videos.component.html | 4 +++- client/src/app/shared/shared-actor-image/actor-avatar.component.ts | 4 +++- .../app/shared/shared-video-miniature/video-miniature.component.html | 4 ++-- .../app/shared/shared-video-miniature/video-miniature.component.ts | 3 +++ 4 files changed, 11 insertions(+), 4 deletions(-) (limited to 'client/src/app') diff --git a/client/src/app/+videos/+video-watch/recommendations/recommended-videos.component.html b/client/src/app/+videos/+video-watch/recommendations/recommended-videos.component.html index e0e9f92e7..e1040fead 100644 --- a/client/src/app/+videos/+video-watch/recommendations/recommended-videos.component.html +++ b/client/src/app/+videos/+video-watch/recommendations/recommended-videos.component.html @@ -15,7 +15,9 @@ + (videoBlocked)="onVideoRemoved()" (videoRemoved)="onVideoRemoved()" (videoAccountMuted)="onVideoRemoved()" + actorImageSize="32" + >
diff --git a/client/src/app/shared/shared-actor-image/actor-avatar.component.ts b/client/src/app/shared/shared-actor-image/actor-avatar.component.ts index 835e15110..e74dd1634 100644 --- a/client/src/app/shared/shared-actor-image/actor-avatar.component.ts +++ b/client/src/app/shared/shared-actor-image/actor-avatar.component.ts @@ -9,6 +9,8 @@ type ActorInput = { url: string } +export type ActorAvatarSize = '18' | '25' | '32' | '34' | '36' | '40' | '100' | '120' + @Component({ selector: 'my-actor-avatar', styleUrls: [ './actor-avatar.component.scss' ], @@ -20,7 +22,7 @@ export class ActorAvatarComponent { @Input() previewImage: SafeResourceUrl - @Input() size: '18' | '25' | '32' | '34' | '36' | '40' | '100' | '120' + @Input() size: ActorAvatarSize // Use an external link @Input() href: string diff --git a/client/src/app/shared/shared-video-miniature/video-miniature.component.html b/client/src/app/shared/shared-video-miniature/video-miniature.component.html index 7c4fcc491..645be92bd 100644 --- a/client/src/app/shared/shared-video-miniature/video-miniature.component.html +++ b/client/src/app/shared/shared-video-miniature/video-miniature.component.html @@ -12,12 +12,12 @@
diff --git a/client/src/app/shared/shared-video-miniature/video-miniature.component.ts b/client/src/app/shared/shared-video-miniature/video-miniature.component.ts index d74b70d4c..b58c118be 100644 --- a/client/src/app/shared/shared-video-miniature/video-miniature.component.ts +++ b/client/src/app/shared/shared-video-miniature/video-miniature.component.ts @@ -12,6 +12,7 @@ import { } from '@angular/core' import { AuthService, ScreenService, ServerService, User } from '@app/core' import { ServerConfig, VideoPlaylistType, VideoPrivacy, VideoState } from '@shared/models' +import { ActorAvatarSize } from '../shared-actor-image/actor-avatar.component' import { Video } from '../shared-main' import { VideoPlaylistService } from '../shared-video-playlist' import { VideoActionsDisplayType } from './video-actions-dropdown.component' @@ -51,6 +52,8 @@ export class VideoMiniatureComponent implements OnInit { } @Input() displayVideoActions = true + @Input() actorImageSize: ActorAvatarSize = '40' + @Input() displayAsRow = false @Input() videoLinkType: VideoLinkType = 'internal' -- cgit v1.2.3