aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/+video-edit/video-update.component.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2017-12-20 14:29:55 +0100
committerChocobozzz <me@florianbigard.com>2017-12-20 14:29:55 +0100
commit15a7387da888492068e2ce3d1e39639d142f6c6e (patch)
tree8eaec71d11c19a97dc99e4d9812dfc0c646dd9e7 /client/src/app/videos/+video-edit/video-update.component.ts
parenta4b8a4ddccc926e0670d3687cccd52496f6f8a8f (diff)
downloadPeerTube-15a7387da888492068e2ce3d1e39639d142f6c6e.tar.gz
PeerTube-15a7387da888492068e2ce3d1e39639d142f6c6e.tar.zst
PeerTube-15a7387da888492068e2ce3d1e39639d142f6c6e.zip
Customize select
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.ts13
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'
5import 'rxjs/add/observable/forkJoin' 5import 'rxjs/add/observable/forkJoin'
6import { VideoPrivacy } from '../../../../../shared/models/videos' 6import { VideoPrivacy } from '../../../../../shared/models/videos'
7import { ServerService } from '../../core' 7import { ServerService } from '../../core'
8import { AuthService } from '../../core/auth'
8import { FormReactive } from '../../shared' 9import { FormReactive } from '../../shared'
9import { ValidatorMessage } from '../../shared/forms/form-validators/validator-message' 10import { ValidatorMessage } from '../../shared/forms/form-validators/validator-message'
11import { populateAsyncUserVideoChannels } from '../../shared/misc/utils'
10import { VideoEdit } from '../../shared/video/video-edit.model' 12import { VideoEdit } from '../../shared/video/video-edit.model'
11import { VideoService } from '../../shared/video/video.service' 13import { 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)