diff options
author | Chocobozzz <me@florianbigard.com> | 2018-09-04 16:21:07 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-09-04 17:31:28 +0200 |
commit | 8cd7faaa331f83903f0bbaead288661218e38bdb (patch) | |
tree | 82e16eb1f7d4d7d259de9aab74c9865fd2ec7081 /client/src/app/videos/+video-edit/video-update.component.ts | |
parent | a94419a604f324305c9dbb607496a5bca9b63d04 (diff) | |
download | PeerTube-8cd7faaa331f83903f0bbaead288661218e38bdb.tar.gz PeerTube-8cd7faaa331f83903f0bbaead288661218e38bdb.tar.zst PeerTube-8cd7faaa331f83903f0bbaead288661218e38bdb.zip |
Better label for video privacies
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 | 6 |
1 files changed, 4 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 0c60e3439..75b11f46c 100644 --- a/client/src/app/videos/+video-edit/video-update.component.ts +++ b/client/src/app/videos/+video-edit/video-update.component.ts | |||
@@ -24,7 +24,7 @@ export class VideoUpdateComponent extends FormReactive implements OnInit { | |||
24 | video: VideoEdit | 24 | video: VideoEdit |
25 | 25 | ||
26 | isUpdatingVideo = false | 26 | isUpdatingVideo = false |
27 | videoPrivacies: VideoConstant<string>[] = [] | 27 | videoPrivacies: VideoConstant<VideoPrivacy>[] = [] |
28 | userVideoChannels: { id: number, label: string, support: string }[] = [] | 28 | userVideoChannels: { id: number, label: string, support: string }[] = [] |
29 | schedulePublicationPossible = false | 29 | schedulePublicationPossible = false |
30 | videoCaptions: VideoCaptionEdit[] = [] | 30 | videoCaptions: VideoCaptionEdit[] = [] |
@@ -62,11 +62,13 @@ export class VideoUpdateComponent extends FormReactive implements OnInit { | |||
62 | 62 | ||
63 | // We cannot set private a video that was not private | 63 | // We cannot set private a video that was not private |
64 | if (this.video.privacy !== VideoPrivacy.PRIVATE) { | 64 | if (this.video.privacy !== VideoPrivacy.PRIVATE) { |
65 | this.videoPrivacies = this.videoPrivacies.filter(p => p.id.toString() !== VideoPrivacy.PRIVATE.toString()) | 65 | this.videoPrivacies = this.videoPrivacies.filter(p => p.id !== VideoPrivacy.PRIVATE) |
66 | } else { // We can schedule video publication only if it it is private | 66 | } else { // We can schedule video publication only if it it is private |
67 | this.schedulePublicationPossible = this.video.privacy === VideoPrivacy.PRIVATE | 67 | this.schedulePublicationPossible = this.video.privacy === VideoPrivacy.PRIVATE |
68 | } | 68 | } |
69 | 69 | ||
70 | this.videoPrivacies = this.videoService.explainedPrivacyLabels(this.videoPrivacies) | ||
71 | |||
70 | // FIXME: Angular does not detect the change inside this subscription, so use the patched setTimeout | 72 | // FIXME: Angular does not detect the change inside this subscription, so use the patched setTimeout |
71 | setTimeout(() => this.hydrateFormFromVideo()) | 73 | setTimeout(() => this.hydrateFormFromVideo()) |
72 | }, | 74 | }, |