]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/shared/video-channel/video-channel.model.ts
Use grid to organise settings in admin, my-account
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / video-channel / video-channel.model.ts
CommitLineData
e63dbd42 1import { VideoChannel as ServerVideoChannel } from '../../../../../shared/models/videos'
d3e91a5f 2import { Actor } from '../actor/actor.model'
a4f99a76 3import { Account } from '../../../../../shared/models/actors'
d3e91a5f
C
4
5export class VideoChannel extends Actor implements ServerVideoChannel {
6 displayName: string
7 description: string
8 support: string
9 isLocal: boolean
8a19bee1 10 nameWithHost: string
288c78ea 11 nameWithHostForced: string
a4f99a76
C
12 ownerAccount?: Account
13 ownerBy?: string
14 ownerAvatarUrl?: string
d3e91a5f
C
15
16 constructor (hash: ServerVideoChannel) {
17 super(hash)
18
19 this.displayName = hash.displayName
20 this.description = hash.description
21 this.support = hash.support
22 this.isLocal = hash.isLocal
8a19bee1 23 this.nameWithHost = Actor.CREATE_BY_STRING(this.name, this.host)
288c78ea 24 this.nameWithHostForced = Actor.CREATE_BY_STRING(this.name, this.host, true)
a4f99a76
C
25
26 if (hash.ownerAccount) {
27 this.ownerAccount = hash.ownerAccount
28 this.ownerBy = Actor.CREATE_BY_STRING(hash.ownerAccount.name, hash.ownerAccount.host)
29 this.ownerAvatarUrl = Actor.GET_ACTOR_AVATAR_URL(this.ownerAccount)
30 }
d3e91a5f
C
31 }
32}