]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+videos/+video-edit/video-add-components/video-send.ts
Merge branch 'constant-registry' into develop
[github/Chocobozzz/PeerTube.git] / client / src / app / +videos / +video-edit / video-add-components / video-send.ts
index 0e7a26a47daf05be88eefe92d8a3bb5ddd224a85..ce8de049d85d0b5a51c755ee36c76b3da758434c 100644 (file)
@@ -15,8 +15,8 @@ export abstract class VideoSend extends FormReactive implements OnInit {
   videoPrivacies: VideoConstant<VideoPrivacy>[] = []
   videoCaptions: VideoCaptionEdit[] = []
 
-  firstStepPrivacyId = 0
-  firstStepChannelId = 0
+  firstStepPrivacyId: VideoPrivacy
+  firstStepChannelId: number
 
   abstract firstStepDone: EventEmitter<string>
   abstract firstStepError: EventEmitter<void>
@@ -24,11 +24,15 @@ export abstract class VideoSend extends FormReactive implements OnInit {
   protected loadingBar: LoadingBarService
   protected notifier: Notifier
   protected authService: AuthService
+
   protected serverService: ServerService
   protected videoService: VideoService
   protected videoCaptionService: VideoCaptionService
+
   protected serverConfig: HTMLServerConfig
 
+  protected highestPrivacy: VideoPrivacy
+
   abstract canDeactivate (): CanComponentDeactivateResult
 
   ngOnInit () {
@@ -49,6 +53,8 @@ export abstract class VideoSend extends FormReactive implements OnInit {
 
             this.videoPrivacies = videoPrivacies
             this.firstStepPrivacyId = defaultPrivacyId
+
+            this.highestPrivacy = this.videoService.getHighestAvailablePrivacy(privacies)
           })
   }