diff options
author | Chocobozzz <me@florianbigard.com> | 2019-03-14 14:55:10 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2019-03-18 11:17:59 +0100 |
commit | 978c9d497b36e52196eb7e755406571e5d57cbc7 (patch) | |
tree | 6984ab06e2c64542221f7329f7560d9e8025e660 /client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-create.component.ts | |
parent | c5e4e36d2a1ad777233177c11f7f742df717a8e8 (diff) | |
download | PeerTube-978c9d497b36e52196eb7e755406571e5d57cbc7.tar.gz PeerTube-978c9d497b36e52196eb7e755406571e5d57cbc7.tar.zst PeerTube-978c9d497b36e52196eb7e755406571e5d57cbc7.zip |
Add playlist channel validator when playlist is public
Diffstat (limited to 'client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-create.component.ts')
-rw-r--r-- | client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-create.component.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-create.component.ts b/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-create.component.ts index 61b61e221..87a10961f 100644 --- a/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-create.component.ts +++ b/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-create.component.ts | |||
@@ -35,13 +35,17 @@ export class MyAccountVideoPlaylistCreateComponent extends MyAccountVideoPlaylis | |||
35 | 35 | ||
36 | ngOnInit () { | 36 | ngOnInit () { |
37 | this.buildForm({ | 37 | this.buildForm({ |
38 | 'display-name': this.videoPlaylistValidatorsService.VIDEO_PLAYLIST_DISPLAY_NAME, | 38 | displayName: this.videoPlaylistValidatorsService.VIDEO_PLAYLIST_DISPLAY_NAME, |
39 | privacy: this.videoPlaylistValidatorsService.VIDEO_PLAYLIST_PRIVACY, | 39 | privacy: this.videoPlaylistValidatorsService.VIDEO_PLAYLIST_PRIVACY, |
40 | description: this.videoPlaylistValidatorsService.VIDEO_PLAYLIST_DESCRIPTION, | 40 | description: this.videoPlaylistValidatorsService.VIDEO_PLAYLIST_DESCRIPTION, |
41 | videoChannelId: this.videoPlaylistValidatorsService.VIDEO_PLAYLIST_CHANNEL_ID, | 41 | videoChannelId: this.videoPlaylistValidatorsService.VIDEO_PLAYLIST_CHANNEL_ID, |
42 | thumbnailfile: null | 42 | thumbnailfile: null |
43 | }) | 43 | }) |
44 | 44 | ||
45 | this.form.get('privacy').valueChanges.subscribe(privacy => { | ||
46 | this.videoPlaylistValidatorsService.setChannelValidator(this.form.get('videoChannelId'), privacy) | ||
47 | }) | ||
48 | |||
45 | populateAsyncUserVideoChannels(this.authService, this.userVideoChannels) | 49 | populateAsyncUserVideoChannels(this.authService, this.userVideoChannels) |
46 | 50 | ||
47 | this.serverService.videoPlaylistPrivaciesLoaded.subscribe( | 51 | this.serverService.videoPlaylistPrivaciesLoaded.subscribe( |
@@ -60,7 +64,7 @@ export class MyAccountVideoPlaylistCreateComponent extends MyAccountVideoPlaylis | |||
60 | 64 | ||
61 | const body = this.form.value | 65 | const body = this.form.value |
62 | const videoPlaylistCreate: VideoPlaylistCreate = { | 66 | const videoPlaylistCreate: VideoPlaylistCreate = { |
63 | displayName: body['display-name'], | 67 | displayName: body.displayName, |
64 | privacy: body.privacy, | 68 | privacy: body.privacy, |
65 | description: body.description || null, | 69 | description: body.description || null, |
66 | videoChannelId: body.videoChannelId || null, | 70 | videoChannelId: body.videoChannelId || null, |