diff options
author | Chocobozzz <me@florianbigard.com> | 2018-05-11 15:10:13 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-05-11 15:25:51 +0200 |
commit | 0f320037e689b2778959c12ddd4ce790f6e4ae4f (patch) | |
tree | 425acaa4345442388901c833275bb76b42a8a268 /client/src/app/shared | |
parent | 9675333decd0b89b73a4fc67b39272f7296bfe3f (diff) | |
download | PeerTube-0f320037e689b2778959c12ddd4ce790f6e4ae4f.tar.gz PeerTube-0f320037e689b2778959c12ddd4ce790f6e4ae4f.tar.zst PeerTube-0f320037e689b2778959c12ddd4ce790f6e4ae4f.zip |
Add ability to update a video channel
Diffstat (limited to 'client/src/app/shared')
-rw-r--r-- | client/src/app/shared/actor/actor.model.ts | 6 | ||||
-rw-r--r-- | client/src/app/shared/video/video-edit.model.ts | 6 | ||||
-rw-r--r-- | client/src/app/shared/video/video.model.ts | 10 | ||||
-rw-r--r-- | client/src/app/shared/video/video.service.ts | 1 |
4 files changed, 17 insertions, 6 deletions
diff --git a/client/src/app/shared/actor/actor.model.ts b/client/src/app/shared/actor/actor.model.ts index 56ff780b7..37d84cb6e 100644 --- a/client/src/app/shared/actor/actor.model.ts +++ b/client/src/app/shared/actor/actor.model.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { Actor as ActorServer } from '../../../../../shared/models/actors/actor.model' | 1 | import { Actor as ActorServer } from '../../../../../shared/models/actors/actor.model' |
2 | import { getAbsoluteAPIUrl } from '@app/shared/misc/utils' | ||
3 | import { Avatar } from '../../../../../shared/models/avatars/avatar.model' | 2 | import { Avatar } from '../../../../../shared/models/avatars/avatar.model' |
3 | import { getAbsoluteAPIUrl } from '@app/shared/misc/utils' | ||
4 | 4 | ||
5 | export abstract class Actor implements ActorServer { | 5 | export abstract class Actor implements ActorServer { |
6 | id: number | 6 | id: number |
@@ -41,8 +41,8 @@ export abstract class Actor implements ActorServer { | |||
41 | this.host = hash.host | 41 | this.host = hash.host |
42 | this.followingCount = hash.followingCount | 42 | this.followingCount = hash.followingCount |
43 | this.followersCount = hash.followersCount | 43 | this.followersCount = hash.followersCount |
44 | this.createdAt = new Date(hash.createdAt.toString()) | 44 | this.createdAt = new Date(hash.createdAt) |
45 | this.updatedAt = new Date(hash.updatedAt.toString()) | 45 | this.updatedAt = new Date(hash.updatedAt) |
46 | this.avatar = hash.avatar | 46 | this.avatar = hash.avatar |
47 | 47 | ||
48 | this.avatarUrl = Actor.GET_ACTOR_AVATAR_URL(this) | 48 | this.avatarUrl = Actor.GET_ACTOR_AVATAR_URL(this) |
diff --git a/client/src/app/shared/video/video-edit.model.ts b/client/src/app/shared/video/video-edit.model.ts index 39826d71e..ad2929db5 100644 --- a/client/src/app/shared/video/video-edit.model.ts +++ b/client/src/app/shared/video/video-edit.model.ts | |||
@@ -10,7 +10,7 @@ export class VideoEdit { | |||
10 | tags: string[] | 10 | tags: string[] |
11 | nsfw: boolean | 11 | nsfw: boolean |
12 | commentsEnabled: boolean | 12 | commentsEnabled: boolean |
13 | channel: number | 13 | channelId: number |
14 | privacy: VideoPrivacy | 14 | privacy: VideoPrivacy |
15 | support: string | 15 | support: string |
16 | thumbnailfile?: any | 16 | thumbnailfile?: any |
@@ -32,7 +32,7 @@ export class VideoEdit { | |||
32 | this.tags = videoDetails.tags | 32 | this.tags = videoDetails.tags |
33 | this.nsfw = videoDetails.nsfw | 33 | this.nsfw = videoDetails.nsfw |
34 | this.commentsEnabled = videoDetails.commentsEnabled | 34 | this.commentsEnabled = videoDetails.commentsEnabled |
35 | this.channel = videoDetails.channel.id | 35 | this.channelId = videoDetails.channel.id |
36 | this.privacy = videoDetails.privacy.id | 36 | this.privacy = videoDetails.privacy.id |
37 | this.support = videoDetails.support | 37 | this.support = videoDetails.support |
38 | this.thumbnailUrl = videoDetails.thumbnailUrl | 38 | this.thumbnailUrl = videoDetails.thumbnailUrl |
@@ -57,7 +57,7 @@ export class VideoEdit { | |||
57 | tags: this.tags, | 57 | tags: this.tags, |
58 | nsfw: this.nsfw, | 58 | nsfw: this.nsfw, |
59 | commentsEnabled: this.commentsEnabled, | 59 | commentsEnabled: this.commentsEnabled, |
60 | channelId: this.channel, | 60 | channelId: this.channelId, |
61 | privacy: this.privacy | 61 | privacy: this.privacy |
62 | } | 62 | } |
63 | } | 63 | } |
diff --git a/client/src/app/shared/video/video.model.ts b/client/src/app/shared/video/video.model.ts index f56eecaeb..48d562f9c 100644 --- a/client/src/app/shared/video/video.model.ts +++ b/client/src/app/shared/video/video.model.ts | |||
@@ -45,6 +45,16 @@ export class Video implements VideoServerModel { | |||
45 | avatar: Avatar | 45 | avatar: Avatar |
46 | } | 46 | } |
47 | 47 | ||
48 | channel: { | ||
49 | id: number | ||
50 | uuid: string | ||
51 | name: string | ||
52 | displayName: string | ||
53 | url: string | ||
54 | host: string | ||
55 | avatar: Avatar | ||
56 | } | ||
57 | |||
48 | private static createDurationString (duration: number) { | 58 | private static createDurationString (duration: number) { |
49 | const hours = Math.floor(duration / 3600) | 59 | const hours = Math.floor(duration / 3600) |
50 | const minutes = Math.floor(duration % 3600 / 60) | 60 | const minutes = Math.floor(duration % 3600 / 60) |
diff --git a/client/src/app/shared/video/video.service.ts b/client/src/app/shared/video/video.service.ts index b45777c55..cd8539b41 100644 --- a/client/src/app/shared/video/video.service.ts +++ b/client/src/app/shared/video/video.service.ts | |||
@@ -67,6 +67,7 @@ export class VideoService { | |||
67 | language, | 67 | language, |
68 | support, | 68 | support, |
69 | description, | 69 | description, |
70 | channelId: video.channelId, | ||
70 | privacy: video.privacy, | 71 | privacy: video.privacy, |
71 | tags: video.tags, | 72 | tags: video.tags, |
72 | nsfw: video.nsfw, | 73 | nsfw: video.nsfw, |