diff options
author | Chocobozzz <me@florianbigard.com> | 2021-06-29 17:18:30 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-06-29 17:18:39 +0200 |
commit | 911186dae411d78788ccede093c251303187589a (patch) | |
tree | 967a07cd985ae4e2ea5249855726455fe929471d /client/src/app/+videos/+video-watch/shared/metadata/video-avatar-channel.component.ts | |
parent | b0c43e36dbdc2c964f6828a78b146faebfb75b21 (diff) | |
download | PeerTube-911186dae411d78788ccede093c251303187589a.tar.gz PeerTube-911186dae411d78788ccede093c251303187589a.tar.zst PeerTube-911186dae411d78788ccede093c251303187589a.zip |
Reorganize watch components
Diffstat (limited to 'client/src/app/+videos/+video-watch/shared/metadata/video-avatar-channel.component.ts')
-rw-r--r-- | client/src/app/+videos/+video-watch/shared/metadata/video-avatar-channel.component.ts | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/client/src/app/+videos/+video-watch/shared/metadata/video-avatar-channel.component.ts b/client/src/app/+videos/+video-watch/shared/metadata/video-avatar-channel.component.ts new file mode 100644 index 000000000..63edd7bad --- /dev/null +++ b/client/src/app/+videos/+video-watch/shared/metadata/video-avatar-channel.component.ts | |||
@@ -0,0 +1,26 @@ | |||
1 | import { Component, Input, OnInit } from '@angular/core' | ||
2 | import { Video } from '@app/shared/shared-main/video' | ||
3 | |||
4 | @Component({ | ||
5 | selector: 'my-video-avatar-channel', | ||
6 | templateUrl: './video-avatar-channel.component.html', | ||
7 | styleUrls: [ './video-avatar-channel.component.scss' ] | ||
8 | }) | ||
9 | export class VideoAvatarChannelComponent implements OnInit { | ||
10 | @Input() video: Video | ||
11 | @Input() byAccount: string | ||
12 | |||
13 | @Input() genericChannel: boolean | ||
14 | |||
15 | channelLinkTitle = '' | ||
16 | accountLinkTitle = '' | ||
17 | |||
18 | ngOnInit () { | ||
19 | this.channelLinkTitle = $localize`${this.video.account.name} (channel page)` | ||
20 | this.accountLinkTitle = $localize`${this.video.byAccount} (account page)` | ||
21 | } | ||
22 | |||
23 | isChannelAvatarNull () { | ||
24 | return this.video.channel.avatar === null | ||
25 | } | ||
26 | } | ||