aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/channel/avatar.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/channel/avatar.component.ts')
-rw-r--r--client/src/app/shared/channel/avatar.component.ts28
1 files changed, 24 insertions, 4 deletions
diff --git a/client/src/app/shared/channel/avatar.component.ts b/client/src/app/shared/channel/avatar.component.ts
index 2201c04ca..2c8eeb4b2 100644
--- a/client/src/app/shared/channel/avatar.component.ts
+++ b/client/src/app/shared/channel/avatar.component.ts
@@ -1,11 +1,31 @@
1import { Component, Input } from '@angular/core' 1import { Component, Input, OnInit } from '@angular/core'
2import { VideoDetails } from '../video/video-details.model' 2import { Video } from '../video/video.model'
3import { I18n } from '@ngx-translate/i18n-polyfill'
3 4
4@Component({ 5@Component({
5 selector: 'avatar-channel', 6 selector: 'avatar-channel',
6 templateUrl: './avatar.component.html', 7 templateUrl: './avatar.component.html',
7 styleUrls: [ './avatar.component.scss' ] 8 styleUrls: [ './avatar.component.scss' ]
8}) 9})
9export class AvatarComponent { 10export class AvatarComponent implements OnInit {
10 @Input() video: VideoDetails 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(
23 'Go to the channel page of {{name}} ({{handle}})',
24 { name: this.video.channel.name, handle: this.video.byVideoChannel }
25 )
26 this.accountLinkTitle = this.i18n(
27 'Go to the account page of {{name}} ({{handle}})',
28 { name: this.video.account.name, handle: this.video.byAccount }
29 )
30 }
11} 31}