aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/+video-edit
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/videos/+video-edit')
-rw-r--r--client/src/app/videos/+video-edit/shared/video-edit.component.html2
-rw-r--r--client/src/app/videos/+video-edit/shared/video-edit.component.scss4
-rw-r--r--client/src/app/videos/+video-edit/shared/video-edit.component.ts2
-rw-r--r--client/src/app/videos/+video-edit/video-add.component.ts2
-rw-r--r--client/src/app/videos/+video-edit/video-update.component.ts10
5 files changed, 6 insertions, 14 deletions
diff --git a/client/src/app/videos/+video-edit/shared/video-edit.component.html b/client/src/app/videos/+video-edit/shared/video-edit.component.html
index 9cd3454a0..77b554ad5 100644
--- a/client/src/app/videos/+video-edit/shared/video-edit.component.html
+++ b/client/src/app/videos/+video-edit/shared/video-edit.component.html
@@ -33,7 +33,7 @@
33 <div class="col-md-4"> 33 <div class="col-md-4">
34 <div class="form-group"> 34 <div class="form-group">
35 <label>Channel</label> 35 <label>Channel</label>
36 <div class="peertube-select-disabled-container"> 36 <div class="peertube-select-container">
37 <select formControlName="channelId"> 37 <select formControlName="channelId">
38 <option *ngFor="let channel of userVideoChannels" [value]="channel.id">{{ channel.label }}</option> 38 <option *ngFor="let channel of userVideoChannels" [value]="channel.id">{{ channel.label }}</option>
39 </select> 39 </select>
diff --git a/client/src/app/videos/+video-edit/shared/video-edit.component.scss b/client/src/app/videos/+video-edit/shared/video-edit.component.scss
index cf64ff589..58ed5ab98 100644
--- a/client/src/app/videos/+video-edit/shared/video-edit.component.scss
+++ b/client/src/app/videos/+video-edit/shared/video-edit.component.scss
@@ -5,10 +5,6 @@
5 @include peertube-select-container(auto); 5 @include peertube-select-container(auto);
6} 6}
7 7
8.peertube-select-disabled-container {
9 @include peertube-select-disabled-container(auto);
10}
11
12.form-group-checkbox { 8.form-group-checkbox {
13 my-help { margin-left: 5px } 9 my-help { margin-left: 5px }
14} 10}
diff --git a/client/src/app/videos/+video-edit/shared/video-edit.component.ts b/client/src/app/videos/+video-edit/shared/video-edit.component.ts
index 6ab1a4a24..77e984855 100644
--- a/client/src/app/videos/+video-edit/shared/video-edit.component.ts
+++ b/client/src/app/videos/+video-edit/shared/video-edit.component.ts
@@ -75,7 +75,7 @@ export class VideoEditComponent implements OnInit {
75 75
76 this.form.addControl('name', new FormControl('', VIDEO_NAME.VALIDATORS)) 76 this.form.addControl('name', new FormControl('', VIDEO_NAME.VALIDATORS))
77 this.form.addControl('privacy', new FormControl('', VIDEO_PRIVACY.VALIDATORS)) 77 this.form.addControl('privacy', new FormControl('', VIDEO_PRIVACY.VALIDATORS))
78 this.form.addControl('channelId', new FormControl({ value: '', disabled: true })) 78 this.form.addControl('channelId', new FormControl('', VIDEO_CHANNEL.VALIDATORS))
79 this.form.addControl('nsfw', new FormControl(false)) 79 this.form.addControl('nsfw', new FormControl(false))
80 this.form.addControl('commentsEnabled', new FormControl(true)) 80 this.form.addControl('commentsEnabled', new FormControl(true))
81 this.form.addControl('category', new FormControl('', VIDEO_CATEGORY.VALIDATORS)) 81 this.form.addControl('category', new FormControl('', VIDEO_CATEGORY.VALIDATORS))
diff --git a/client/src/app/videos/+video-edit/video-add.component.ts b/client/src/app/videos/+video-edit/video-add.component.ts
index ae5548897..fa967018d 100644
--- a/client/src/app/videos/+video-edit/video-add.component.ts
+++ b/client/src/app/videos/+video-edit/video-add.component.ts
@@ -220,7 +220,7 @@ export class VideoAddComponent extends FormReactive implements OnInit, OnDestroy
220 220
221 const video = new VideoEdit() 221 const video = new VideoEdit()
222 video.patch(this.form.value) 222 video.patch(this.form.value)
223 video.channel = this.firstStepChannelId 223 video.channelId = this.firstStepChannelId
224 video.id = this.videoUploadedIds.id 224 video.id = this.videoUploadedIds.id
225 video.uuid = this.videoUploadedIds.uuid 225 video.uuid = this.videoUploadedIds.uuid
226 226
diff --git a/client/src/app/videos/+video-edit/video-update.component.ts b/client/src/app/videos/+video-edit/video-update.component.ts
index 6cd204f72..73e2764c6 100644
--- a/client/src/app/videos/+video-edit/video-update.component.ts
+++ b/client/src/app/videos/+video-edit/video-update.component.ts
@@ -9,9 +9,9 @@ import { ServerService } from '../../core'
9import { AuthService } from '../../core/auth' 9import { AuthService } from '../../core/auth'
10import { FormReactive } from '../../shared' 10import { FormReactive } from '../../shared'
11import { ValidatorMessage } from '../../shared/forms/form-validators/validator-message' 11import { ValidatorMessage } from '../../shared/forms/form-validators/validator-message'
12import { populateAsyncUserVideoChannels } from '../../shared/misc/utils'
13import { VideoEdit } from '../../shared/video/video-edit.model' 12import { VideoEdit } from '../../shared/video/video-edit.model'
14import { VideoService } from '../../shared/video/video.service' 13import { VideoService } from '../../shared/video/video.service'
14import { populateAsyncUserVideoChannels } from '@app/shared/misc/utils'
15 15
16@Component({ 16@Component({
17 selector: 'my-videos-update', 17 selector: 'my-videos-update',
@@ -64,12 +64,8 @@ export class VideoUpdateComponent extends FormReactive implements OnInit {
64 video => { 64 video => {
65 this.video = new VideoEdit(video) 65 this.video = new VideoEdit(video)
66 66
67 this.userVideoChannels = [ 67 populateAsyncUserVideoChannels(this.authService, this.userVideoChannels)
68 { 68 .catch(err => console.error(err))
69 id: video.channel.id,
70 label: video.channel.displayName
71 }
72 ]
73 69
74 // We cannot set private a video that was not private 70 // We cannot set private a video that was not private
75 if (video.privacy.id !== VideoPrivacy.PRIVATE) { 71 if (video.privacy.id !== VideoPrivacy.PRIVATE) {