aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-main/account/video-avatar-channel.component.ts
blob: 440e2b522dd80e4a582f9c1993deeb4cab1f8fd0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { Component, Input, OnInit } from '@angular/core'
import { Video } from '../video/video.model'

@Component({
  selector: 'my-video-avatar-channel',
  templateUrl: './video-avatar-channel.component.html',
  styleUrls: [ './video-avatar-channel.component.scss' ]
})
export class VideoAvatarChannelComponent implements OnInit {
  @Input() video: Video
  @Input() byAccount: string

  @Input() size: 'md' | 'sm' = 'md'
  @Input() genericChannel: boolean

  channelLinkTitle = ''
  accountLinkTitle = ''

  ngOnInit () {
    this.channelLinkTitle = $localize`${this.video.account.name} (channel page)`
    this.accountLinkTitle = $localize`${this.video.byAccount} (account page)`
  }

  isChannelAvatarNull () {
    return this.video.channel.avatar === null
  }
}