]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/shared/shared-main/account/avatar.component.ts
Use 3 tables to represent abuses
[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'
3import { I18n } from '@ngx-translate/i18n-polyfill'
dd4f25ee
RK
4
5@Component({
6 selector: 'avatar-channel',
7 templateUrl: './avatar.component.html',
8 styleUrls: [ './avatar.component.scss' ]
9})
c2caa99b
RK
10export class AvatarComponent implements OnInit {
11 @Input() video: Video
12 @Input() size: 'md' | 'sm' = 'md'
13
14 channelLinkTitle = ''
15 accountLinkTitle = ''
16
17 constructor (
18 private i18n: I18n
19 ) {}
20
21 ngOnInit () {
22 this.channelLinkTitle = this.i18n(
d6d951dd 23 '{{name}} (channel page)',
c2caa99b
RK
24 { name: this.video.channel.name, handle: this.video.byVideoChannel }
25 )
26 this.accountLinkTitle = this.i18n(
d6d951dd 27 '{{name}} (account page)',
c2caa99b
RK
28 { name: this.video.account.name, handle: this.video.byAccount }
29 )
30 }
dd4f25ee 31}