aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/video-channel
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-08-17 15:45:42 +0200
committerChocobozzz <me@florianbigard.com>2018-08-27 09:41:54 +0200
commit8a19bee1a1ee39f973bb37429e4f73c3f2873cdb (patch)
tree33c93ef19451d7e46d4be74ce0681359d2dcc70e /client/src/app/shared/video-channel
parent965c4b22d0e4d2f853501e844e6ebbb861bd389d (diff)
downloadPeerTube-8a19bee1a1ee39f973bb37429e4f73c3f2873cdb.tar.gz
PeerTube-8a19bee1a1ee39f973bb37429e4f73c3f2873cdb.tar.zst
PeerTube-8a19bee1a1ee39f973bb37429e4f73c3f2873cdb.zip
Add ability to set a name to a channel
Diffstat (limited to 'client/src/app/shared/video-channel')
-rw-r--r--client/src/app/shared/video-channel/video-channel.model.ts2
-rw-r--r--client/src/app/shared/video-channel/video-channel.service.ts4
2 files changed, 4 insertions, 2 deletions
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 b6862b681..309b614ae 100644
--- a/client/src/app/shared/video-channel/video-channel.model.ts
+++ b/client/src/app/shared/video-channel/video-channel.model.ts
@@ -7,6 +7,7 @@ export class VideoChannel extends Actor implements ServerVideoChannel {
7 description: string 7 description: string
8 support: string 8 support: string
9 isLocal: boolean 9 isLocal: boolean
10 nameWithHost: string
10 ownerAccount?: Account 11 ownerAccount?: Account
11 ownerBy?: string 12 ownerBy?: string
12 ownerAvatarUrl?: string 13 ownerAvatarUrl?: string
@@ -18,6 +19,7 @@ export class VideoChannel extends Actor implements ServerVideoChannel {
18 this.description = hash.description 19 this.description = hash.description
19 this.support = hash.support 20 this.support = hash.support
20 this.isLocal = hash.isLocal 21 this.isLocal = hash.isLocal
22 this.nameWithHost = Actor.CREATE_BY_STRING(this.name, this.host)
21 23
22 if (hash.ownerAccount) { 24 if (hash.ownerAccount) {
23 this.ownerAccount = hash.ownerAccount 25 this.ownerAccount = hash.ownerAccount
diff --git a/client/src/app/shared/video-channel/video-channel.service.ts b/client/src/app/shared/video-channel/video-channel.service.ts
index 8c000665f..510dc9c3d 100644
--- a/client/src/app/shared/video-channel/video-channel.service.ts
+++ b/client/src/app/shared/video-channel/video-channel.service.ts
@@ -22,8 +22,8 @@ export class VideoChannelService {
22 private restExtractor: RestExtractor 22 private restExtractor: RestExtractor
23 ) {} 23 ) {}
24 24
25 getVideoChannel (videoChannelUUID: string) { 25 getVideoChannel (videoChannelName: string) {
26 return this.authHttp.get<VideoChannel>(VideoChannelService.BASE_VIDEO_CHANNEL_URL + videoChannelUUID) 26 return this.authHttp.get<VideoChannel>(VideoChannelService.BASE_VIDEO_CHANNEL_URL + videoChannelName)
27 .pipe( 27 .pipe(
28 map(videoChannelHash => new VideoChannel(videoChannelHash)), 28 map(videoChannelHash => new VideoChannel(videoChannelHash)),
29 tap(videoChannel => this.videoChannelLoaded.next(videoChannel)), 29 tap(videoChannel => this.videoChannelLoaded.next(videoChannel)),