diff options
Diffstat (limited to 'client/src/app/shared')
3 files changed, 8 insertions, 3 deletions
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 = { | |||
9 | url: string | 9 | url: string |
10 | } | 10 | } |
11 | 11 | ||
12 | export type ActorAvatarSize = '18' | '25' | '32' | '34' | '36' | '40' | '100' | '120' | ||
13 | |||
12 | @Component({ | 14 | @Component({ |
13 | selector: 'my-actor-avatar', | 15 | selector: 'my-actor-avatar', |
14 | styleUrls: [ './actor-avatar.component.scss' ], | 16 | styleUrls: [ './actor-avatar.component.scss' ], |
@@ -20,7 +22,7 @@ export class ActorAvatarComponent { | |||
20 | 22 | ||
21 | @Input() previewImage: SafeResourceUrl | 23 | @Input() previewImage: SafeResourceUrl |
22 | 24 | ||
23 | @Input() size: '18' | '25' | '32' | '34' | '36' | '40' | '100' | '120' | 25 | @Input() size: ActorAvatarSize |
24 | 26 | ||
25 | // Use an external link | 27 | // Use an external link |
26 | @Input() href: string | 28 | @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 @@ | |||
12 | <div class="d-flex video-miniature-meta"> | 12 | <div class="d-flex video-miniature-meta"> |
13 | <my-actor-avatar | 13 | <my-actor-avatar |
14 | *ngIf="displayOptions.avatar && displayOwnerVideoChannel()" [title]="channelLinkTitle" | 14 | *ngIf="displayOptions.avatar && displayOwnerVideoChannel()" [title]="channelLinkTitle" |
15 | [channel]="video.channel" size="40" [internalHref]="[ '/video-channels', video.byVideoChannel ]" | 15 | [channel]="video.channel" [size]="actorImageSize" [internalHref]="[ '/video-channels', video.byVideoChannel ]" |
16 | ></my-actor-avatar> | 16 | ></my-actor-avatar> |
17 | 17 | ||
18 | <my-actor-avatar | 18 | <my-actor-avatar |
19 | *ngIf="displayOptions.avatar && displayOwnerAccount()" [title]="channelLinkTitle" | 19 | *ngIf="displayOptions.avatar && displayOwnerAccount()" [title]="channelLinkTitle" |
20 | [account]="video.account" size="40" [internalHref]="[ '/video-channels', video.byVideoChannel ]" | 20 | [account]="video.account" [size]="actorImageSize" [internalHref]="[ '/video-channels', video.byVideoChannel ]" |
21 | ></my-actor-avatar> | 21 | ></my-actor-avatar> |
22 | 22 | ||
23 | <div class="w-100 d-flex flex-column"> | 23 | <div class="w-100 d-flex flex-column"> |
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 { | |||
12 | } from '@angular/core' | 12 | } from '@angular/core' |
13 | import { AuthService, ScreenService, ServerService, User } from '@app/core' | 13 | import { AuthService, ScreenService, ServerService, User } from '@app/core' |
14 | import { ServerConfig, VideoPlaylistType, VideoPrivacy, VideoState } from '@shared/models' | 14 | import { ServerConfig, VideoPlaylistType, VideoPrivacy, VideoState } from '@shared/models' |
15 | import { ActorAvatarSize } from '../shared-actor-image/actor-avatar.component' | ||
15 | import { Video } from '../shared-main' | 16 | import { Video } from '../shared-main' |
16 | import { VideoPlaylistService } from '../shared-video-playlist' | 17 | import { VideoPlaylistService } from '../shared-video-playlist' |
17 | import { VideoActionsDisplayType } from './video-actions-dropdown.component' | 18 | import { VideoActionsDisplayType } from './video-actions-dropdown.component' |
@@ -51,6 +52,8 @@ export class VideoMiniatureComponent implements OnInit { | |||
51 | } | 52 | } |
52 | @Input() displayVideoActions = true | 53 | @Input() displayVideoActions = true |
53 | 54 | ||
55 | @Input() actorImageSize: ActorAvatarSize = '40' | ||
56 | |||
54 | @Input() displayAsRow = false | 57 | @Input() displayAsRow = false |
55 | 58 | ||
56 | @Input() videoLinkType: VideoLinkType = 'internal' | 59 | @Input() videoLinkType: VideoLinkType = 'internal' |