From 3fca30a7ef5de53dff7ef7b3122daa0849e4bdc0 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 28 Sep 2022 14:20:11 +0200 Subject: Force channel in my videos --- client/src/app/+my-library/my-videos/my-videos.component.ts | 3 ++- .../shared-video-miniature/video-miniature.component.ts | 12 ++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) (limited to 'client/src/app') diff --git a/client/src/app/+my-library/my-videos/my-videos.component.ts b/client/src/app/+my-library/my-videos/my-videos.component.ts index 2f1eb84ba..3ff0ee248 100644 --- a/client/src/app/+my-library/my-videos/my-videos.component.ts +++ b/client/src/app/+my-library/my-videos/my-videos.component.ts @@ -40,7 +40,8 @@ export class MyVideosComponent implements OnInit, DisableForReuseHook { privacyLabel: false, privacyText: true, state: true, - blacklistInfo: true + blacklistInfo: true, + forceChannelInBy: true } videoDropdownDisplayOptions: VideoActionsDisplayType = { playlist: false, 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 534a78b3f..20596d6d0 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 @@ -21,13 +21,15 @@ import { VideoActionsDisplayType } from './video-actions-dropdown.component' export type MiniatureDisplayOptions = { date?: boolean views?: boolean - by?: boolean avatar?: boolean privacyLabel?: boolean privacyText?: boolean state?: boolean blacklistInfo?: boolean nsfw?: boolean + + by?: boolean + forceChannelInBy?: boolean } @Component({ selector: 'my-video-miniature', @@ -47,7 +49,8 @@ export class VideoMiniatureComponent implements OnInit { privacyLabel: false, privacyText: false, state: false, - blacklistInfo: false + blacklistInfo: false, + forceChannelInBy: false } @Input() displayVideoActions = true @@ -267,6 +270,11 @@ export class VideoMiniatureComponent implements OnInit { } private setUpBy () { + if (this.displayOptions.forceChannelInBy) { + this.ownerDisplayType = 'videoChannel' + return + } + const accountName = this.video.account.name // If the video channel name is an UUID (not really displayable, we changed this behaviour in v1.0.0-beta.12) -- cgit v1.2.3