]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/shared/shared-main/account/avatar.component.ts
Add new default different avatar for channel and account
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-main / account / avatar.component.ts
CommitLineData
c2caa99b
RK
1import { Component, Input, OnInit } from '@angular/core'
2import { Video } from '../video/video.model'
dd4f25ee
RK
3
4@Component({
5 selector: 'avatar-channel',
6 templateUrl: './avatar.component.html',
7 styleUrls: [ './avatar.component.scss' ]
8})
c2caa99b
RK
9export class AvatarComponent implements OnInit {
10 @Input() video: Video
11 @Input() size: 'md' | 'sm' = 'md'
b40a2193 12 @Input() genericChannel: boolean
c2caa99b
RK
13
14 channelLinkTitle = ''
15 accountLinkTitle = ''
16
c2caa99b 17 ngOnInit () {
66357162
C
18 this.channelLinkTitle = $localize`${this.video.account.name} (channel page)`
19 this.accountLinkTitle = $localize`${this.video.byAccount} (account page)`
c2caa99b 20 }
b40a2193
K
21
22 isChannelAvatarNull () {
23 return this.video.channel.avatar === null
24 }
dd4f25ee 25}