]>
Commit | Line | Data |
---|---|---|
1 | import { Component, Input, OnInit } from '@angular/core' | |
2 | import { Video } from '../video/video.model' | |
3 | ||
4 | @Component({ | |
5 | selector: 'avatar-channel', | |
6 | templateUrl: './avatar.component.html', | |
7 | styleUrls: [ './avatar.component.scss' ] | |
8 | }) | |
9 | export class AvatarComponent implements OnInit { | |
10 | @Input() video: Video | |
11 | @Input() size: 'md' | 'sm' = 'md' | |
12 | @Input() genericChannel: boolean | |
13 | ||
14 | channelLinkTitle = '' | |
15 | accountLinkTitle = '' | |
16 | ||
17 | ngOnInit () { | |
18 | this.channelLinkTitle = $localize`${this.video.account.name} (channel page)` | |
19 | this.accountLinkTitle = $localize`${this.video.byAccount} (account page)` | |
20 | } | |
21 | ||
22 | isChannelAvatarNull () { | |
23 | return this.video.channel.avatar === null | |
24 | } | |
25 | } |