diff options
author | Chocobozzz <me@florianbigard.com> | 2018-05-23 11:38:00 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-05-23 11:38:18 +0200 |
commit | a4f99a766bd07851a37dd7ff8fed7acc2a3ef021 (patch) | |
tree | 825ae223689f9b6df1553da0f67f44802b1fe4ca /client/src/app | |
parent | b851dabf78d0a7ffad64913498c1f9cd37f16268 (diff) | |
download | PeerTube-a4f99a766bd07851a37dd7ff8fed7acc2a3ef021.tar.gz PeerTube-a4f99a766bd07851a37dd7ff8fed7acc2a3ef021.tar.zst PeerTube-a4f99a766bd07851a37dd7ff8fed7acc2a3ef021.zip |
Add owner in video channel page
Diffstat (limited to 'client/src/app')
-rw-r--r-- | client/src/app/+video-channels/video-channels.component.html | 5 | ||||
-rw-r--r-- | client/src/app/shared/video-channel/video-channel.model.ts | 15 |
2 files changed, 15 insertions, 5 deletions
diff --git a/client/src/app/+video-channels/video-channels.component.html b/client/src/app/+video-channels/video-channels.component.html index 6f14e62a1..da0d76acf 100644 --- a/client/src/app/+video-channels/video-channels.component.html +++ b/client/src/app/+video-channels/video-channels.component.html | |||
@@ -9,6 +9,11 @@ | |||
9 | <div class="actor-display-name">{{ videoChannel.displayName }}</div> | 9 | <div class="actor-display-name">{{ videoChannel.displayName }}</div> |
10 | </div> | 10 | </div> |
11 | <div class="actor-followers">{{ videoChannel.followersCount }} subscribers</div> | 11 | <div class="actor-followers">{{ videoChannel.followersCount }} subscribers</div> |
12 | |||
13 | <a [routerLink]="[ '/accounts', videoChannel.ownerAccount.id ]" title="Go the owner account page" class="actor-owner"> | ||
14 | <span>Created by {{ videoChannel.ownerBy }}</span> | ||
15 | <img [src]="videoChannel.ownerAvatarUrl" alt="Owner account avatar" /> | ||
16 | </a> | ||
12 | </div> | 17 | </div> |
13 | </div> | 18 | </div> |
14 | 19 | ||
diff --git a/client/src/app/shared/video-channel/video-channel.model.ts b/client/src/app/shared/video-channel/video-channel.model.ts index 01381ac30..199c1d3b8 100644 --- a/client/src/app/shared/video-channel/video-channel.model.ts +++ b/client/src/app/shared/video-channel/video-channel.model.ts | |||
@@ -1,15 +1,15 @@ | |||
1 | import { VideoChannel as ServerVideoChannel } from '../../../../../shared/models/videos/video-channel.model' | 1 | import { VideoChannel as ServerVideoChannel } from '../../../../../shared/models/videos/video-channel.model' |
2 | import { Actor } from '../actor/actor.model' | 2 | import { Actor } from '../actor/actor.model' |
3 | import { Account } from '../../../../../shared/models/actors' | ||
3 | 4 | ||
4 | export class VideoChannel extends Actor implements ServerVideoChannel { | 5 | export class VideoChannel extends Actor implements ServerVideoChannel { |
5 | displayName: string | 6 | displayName: string |
6 | description: string | 7 | description: string |
7 | support: string | 8 | support: string |
8 | isLocal: boolean | 9 | isLocal: boolean |
9 | ownerAccount?: { | 10 | ownerAccount?: Account |
10 | id: number | 11 | ownerBy?: string |
11 | uuid: string | 12 | ownerAvatarUrl?: string |
12 | } | ||
13 | 13 | ||
14 | constructor (hash: ServerVideoChannel) { | 14 | constructor (hash: ServerVideoChannel) { |
15 | super(hash) | 15 | super(hash) |
@@ -18,6 +18,11 @@ export class VideoChannel extends Actor implements ServerVideoChannel { | |||
18 | this.description = hash.description | 18 | this.description = hash.description |
19 | this.support = hash.support | 19 | this.support = hash.support |
20 | this.isLocal = hash.isLocal | 20 | this.isLocal = hash.isLocal |
21 | this.ownerAccount = hash.ownerAccount | 21 | |
22 | if (hash.ownerAccount) { | ||
23 | this.ownerAccount = hash.ownerAccount | ||
24 | this.ownerBy = Actor.CREATE_BY_STRING(hash.ownerAccount.name, hash.ownerAccount.host) | ||
25 | this.ownerAvatarUrl = Actor.GET_ACTOR_AVATAR_URL(this.ownerAccount) | ||
26 | } | ||
22 | } | 27 | } |
23 | } | 28 | } |