1 import { Component, Input, OnInit } from '@angular/core'
2 import { Video } from '../video/video.model'
3 import { I18n } from '@ngx-translate/i18n-polyfill'
6 selector: 'avatar-channel',
7 templateUrl: './avatar.component.html',
8 styleUrls: [ './avatar.component.scss' ]
10 export class AvatarComponent implements OnInit {
12 @Input() size: 'md' | 'sm' = 'md'
13 @Input() genericChannel: boolean
23 this.channelLinkTitle = this.i18n(
24 '{{name}} (channel page)',
25 { name: this.video.channel.name, handle: this.video.byVideoChannel }
27 this.accountLinkTitle = this.i18n(
28 '{{name}} (account page)',
29 { name: this.video.account.name, handle: this.video.byAccount }
33 isChannelAvatarNull () {
34 return this.video.channel.avatar === null