diff options
author | Chocobozzz <me@florianbigard.com> | 2019-06-07 14:50:27 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-06-07 15:01:55 +0200 |
commit | 851f5daa1eec66e1faa3c45238ec9ab91be05b00 (patch) | |
tree | a13952cde4ad4434aeaa1894e0270d0515638650 /client/src/app/videos/+video-edit/shared | |
parent | 1b319b7aa6d2f4252615b370aaca6a800be1b1f4 (diff) | |
download | PeerTube-851f5daa1eec66e1faa3c45238ec9ab91be05b00.tar.gz PeerTube-851f5daa1eec66e1faa3c45238ec9ab91be05b00.tar.zst PeerTube-851f5daa1eec66e1faa3c45238ec9ab91be05b00.zip |
Add ability to set a public to private in client
Diffstat (limited to 'client/src/app/videos/+video-edit/shared')
-rw-r--r-- | client/src/app/videos/+video-edit/shared/video-edit.component.ts | 7 |
1 files changed, 6 insertions, 1 deletions
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 95d397b52..a2776b73d 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 | |||
@@ -13,6 +13,7 @@ import { VideoCaptionAddModalComponent } from '@app/videos/+video-edit/shared/vi | |||
13 | import { VideoCaptionEdit } from '@app/shared/video-caption/video-caption-edit.model' | 13 | import { VideoCaptionEdit } from '@app/shared/video-caption/video-caption-edit.model' |
14 | import { removeElementFromArray } from '@app/shared/misc/utils' | 14 | import { removeElementFromArray } from '@app/shared/misc/utils' |
15 | import { VideoConstant, VideoPrivacy } from '../../../../../../shared' | 15 | import { VideoConstant, VideoPrivacy } from '../../../../../../shared' |
16 | import { VideoService } from '@app/shared/video/video.service' | ||
16 | 17 | ||
17 | @Component({ | 18 | @Component({ |
18 | selector: 'my-video-edit', | 19 | selector: 'my-video-edit', |
@@ -23,7 +24,6 @@ export class VideoEditComponent implements OnInit, OnDestroy { | |||
23 | @Input() form: FormGroup | 24 | @Input() form: FormGroup |
24 | @Input() formErrors: { [ id: string ]: string } = {} | 25 | @Input() formErrors: { [ id: string ]: string } = {} |
25 | @Input() validationMessages: FormReactiveValidationMessages = {} | 26 | @Input() validationMessages: FormReactiveValidationMessages = {} |
26 | @Input() videoPrivacies: VideoConstant<VideoPrivacy>[] = [] | ||
27 | @Input() userVideoChannels: { id: number, label: string, support: string }[] = [] | 27 | @Input() userVideoChannels: { id: number, label: string, support: string }[] = [] |
28 | @Input() schedulePublicationPossible = true | 28 | @Input() schedulePublicationPossible = true |
29 | @Input() videoCaptions: (VideoCaptionEdit & { captionPath?: string })[] = [] | 29 | @Input() videoCaptions: (VideoCaptionEdit & { captionPath?: string })[] = [] |
@@ -34,6 +34,7 @@ export class VideoEditComponent implements OnInit, OnDestroy { | |||
34 | // So that it can be accessed in the template | 34 | // So that it can be accessed in the template |
35 | readonly SPECIAL_SCHEDULED_PRIVACY = VideoEdit.SPECIAL_SCHEDULED_PRIVACY | 35 | readonly SPECIAL_SCHEDULED_PRIVACY = VideoEdit.SPECIAL_SCHEDULED_PRIVACY |
36 | 36 | ||
37 | videoPrivacies: VideoConstant<VideoPrivacy>[] = [] | ||
37 | videoCategories: VideoConstant<number>[] = [] | 38 | videoCategories: VideoConstant<number>[] = [] |
38 | videoLicences: VideoConstant<number>[] = [] | 39 | videoLicences: VideoConstant<number>[] = [] |
39 | videoLanguages: VideoConstant<string>[] = [] | 40 | videoLanguages: VideoConstant<string>[] = [] |
@@ -58,6 +59,7 @@ export class VideoEditComponent implements OnInit, OnDestroy { | |||
58 | private formValidatorService: FormValidatorService, | 59 | private formValidatorService: FormValidatorService, |
59 | private videoValidatorsService: VideoValidatorsService, | 60 | private videoValidatorsService: VideoValidatorsService, |
60 | private videoCaptionService: VideoCaptionService, | 61 | private videoCaptionService: VideoCaptionService, |
62 | private videoService: VideoService, | ||
61 | private route: ActivatedRoute, | 63 | private route: ActivatedRoute, |
62 | private router: Router, | 64 | private router: Router, |
63 | private notifier: Notifier, | 65 | private notifier: Notifier, |
@@ -132,6 +134,9 @@ export class VideoEditComponent implements OnInit, OnDestroy { | |||
132 | this.videoLicences = this.serverService.getVideoLicences() | 134 | this.videoLicences = this.serverService.getVideoLicences() |
133 | this.videoLanguages = this.serverService.getVideoLanguages() | 135 | this.videoLanguages = this.serverService.getVideoLanguages() |
134 | 136 | ||
137 | const privacies = this.serverService.getVideoPrivacies() | ||
138 | this.videoPrivacies = this.videoService.explainedPrivacyLabels(privacies) | ||
139 | |||
135 | this.initialVideoCaptions = this.videoCaptions.map(c => c.language.id) | 140 | this.initialVideoCaptions = this.videoCaptions.map(c => c.language.id) |
136 | 141 | ||
137 | this.ngZone.runOutsideAngular(() => { | 142 | this.ngZone.runOutsideAngular(() => { |