aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-main/account/video-avatar-channel.component.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-11-25 11:44:31 +0100
committerChocobozzz <me@florianbigard.com>2020-11-25 11:44:31 +0100
commit69524f6ed170c74fab8d5833920c389fde992f3e (patch)
tree70f21690f6de8e8bb11efb43249d2267d0844165 /client/src/app/shared/shared-main/account/video-avatar-channel.component.ts
parentc418d483004dfbae9ea38d54aa1577db46d34a8a (diff)
downloadPeerTube-69524f6ed170c74fab8d5833920c389fde992f3e.tar.gz
PeerTube-69524f6ed170c74fab8d5833920c389fde992f3e.tar.zst
PeerTube-69524f6ed170c74fab8d5833920c389fde992f3e.zip
Fix circular dep issue
Diffstat (limited to 'client/src/app/shared/shared-main/account/video-avatar-channel.component.ts')
-rw-r--r--client/src/app/shared/shared-main/account/video-avatar-channel.component.ts27
1 files changed, 27 insertions, 0 deletions
diff --git a/client/src/app/shared/shared-main/account/video-avatar-channel.component.ts b/client/src/app/shared/shared-main/account/video-avatar-channel.component.ts
new file mode 100644
index 000000000..440e2b522
--- /dev/null
+++ b/client/src/app/shared/shared-main/account/video-avatar-channel.component.ts
@@ -0,0 +1,27 @@
1import { Component, Input, OnInit } from '@angular/core'
2import { Video } from '../video/video.model'
3
4@Component({
5 selector: 'my-video-avatar-channel',
6 templateUrl: './video-avatar-channel.component.html',
7 styleUrls: [ './video-avatar-channel.component.scss' ]
8})
9export class VideoAvatarChannelComponent implements OnInit {
10 @Input() video: Video
11 @Input() byAccount: string
12
13 @Input() size: 'md' | 'sm' = 'md'
14 @Input() genericChannel: boolean
15
16 channelLinkTitle = ''
17 accountLinkTitle = ''
18
19 ngOnInit () {
20 this.channelLinkTitle = $localize`${this.video.account.name} (channel page)`
21 this.accountLinkTitle = $localize`${this.video.byAccount} (account page)`
22 }
23
24 isChannelAvatarNull () {
25 return this.video.channel.avatar === null
26 }
27}