]>
Commit | Line | Data |
---|---|---|
1 | import { Component, Input, OnInit } from '@angular/core' | |
2 | import { Video } from '@app/shared/shared-main/video' | |
3 | ||
4 | @Component({ | |
5 | selector: 'my-video-avatar-channel', | |
6 | templateUrl: './video-avatar-channel.component.html', | |
7 | styleUrls: [ './video-avatar-channel.component.scss' ] | |
8 | }) | |
9 | export 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 | } |