diff options
Diffstat (limited to 'client/src/app/videos/+video-edit/video-update.component.ts')
-rw-r--r-- | client/src/app/videos/+video-edit/video-update.component.ts | 13 |
1 files changed, 11 insertions, 2 deletions
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 08b74f4c3..941ef2478 100644 --- a/client/src/app/videos/+video-edit/video-update.component.ts +++ b/client/src/app/videos/+video-edit/video-update.component.ts | |||
@@ -5,8 +5,10 @@ import { NotificationsService } from 'angular2-notifications' | |||
5 | import 'rxjs/add/observable/forkJoin' | 5 | import 'rxjs/add/observable/forkJoin' |
6 | import { VideoPrivacy } from '../../../../../shared/models/videos' | 6 | import { VideoPrivacy } from '../../../../../shared/models/videos' |
7 | import { ServerService } from '../../core' | 7 | import { ServerService } from '../../core' |
8 | import { AuthService } from '../../core/auth' | ||
8 | import { FormReactive } from '../../shared' | 9 | import { FormReactive } from '../../shared' |
9 | import { ValidatorMessage } from '../../shared/forms/form-validators/validator-message' | 10 | import { ValidatorMessage } from '../../shared/forms/form-validators/validator-message' |
11 | import { populateAsyncUserVideoChannels } from '../../shared/misc/utils' | ||
10 | import { VideoEdit } from '../../shared/video/video-edit.model' | 12 | import { VideoEdit } from '../../shared/video/video-edit.model' |
11 | import { VideoService } from '../../shared/video/video.service' | 13 | import { VideoService } from '../../shared/video/video.service' |
12 | 14 | ||
@@ -24,6 +26,7 @@ export class VideoUpdateComponent extends FormReactive implements OnInit { | |||
24 | formErrors: { [ id: string ]: string } = {} | 26 | formErrors: { [ id: string ]: string } = {} |
25 | validationMessages: ValidatorMessage = {} | 27 | validationMessages: ValidatorMessage = {} |
26 | videoPrivacies = [] | 28 | videoPrivacies = [] |
29 | userVideoChannels = [] | ||
27 | 30 | ||
28 | constructor ( | 31 | constructor ( |
29 | private formBuilder: FormBuilder, | 32 | private formBuilder: FormBuilder, |
@@ -31,7 +34,8 @@ export class VideoUpdateComponent extends FormReactive implements OnInit { | |||
31 | private router: Router, | 34 | private router: Router, |
32 | private notificationsService: NotificationsService, | 35 | private notificationsService: NotificationsService, |
33 | private serverService: ServerService, | 36 | private serverService: ServerService, |
34 | private videoService: VideoService | 37 | private videoService: VideoService, |
38 | private authService: AuthService | ||
35 | ) { | 39 | ) { |
36 | super() | 40 | super() |
37 | } | 41 | } |
@@ -44,7 +48,12 @@ export class VideoUpdateComponent extends FormReactive implements OnInit { | |||
44 | ngOnInit () { | 48 | ngOnInit () { |
45 | this.buildForm() | 49 | this.buildForm() |
46 | 50 | ||
47 | this.videoPrivacies = this.serverService.getVideoPrivacies() | 51 | this.serverService.videoPrivaciesLoaded |
52 | .subscribe( | ||
53 | () => this.videoPrivacies = this.serverService.getVideoPrivacies() | ||
54 | ) | ||
55 | |||
56 | populateAsyncUserVideoChannels(this.authService, this.userVideoChannels) | ||
48 | 57 | ||
49 | const uuid: string = this.route.snapshot.params['uuid'] | 58 | const uuid: string = this.route.snapshot.params['uuid'] |
50 | this.videoService.getVideo(uuid) | 59 | this.videoService.getVideo(uuid) |