Fix explained privacies on first upload screen

This commit is contained in:
Chocobozzz 2019-04-25 09:52:07 +02:00
parent ff40a4ebab
commit 71d00bfd7f
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
9 changed files with 10 additions and 8 deletions

View File

@ -58,7 +58,7 @@
<form [hidden]="!hasImportedVideo" novalidate [formGroup]="form">
<my-video-edit
[form]="form" [formErrors]="formErrors" [videoCaptions]="videoCaptions" [schedulePublicationPossible]="false"
[validationMessages]="validationMessages" [videoPrivacies]="videoPrivacies" [userVideoChannels]="userVideoChannels"
[validationMessages]="validationMessages" [videoPrivacies]="explainedVideoPrivacies" [userVideoChannels]="userVideoChannels"
></my-video-edit>
<div class="submit-container">

View File

@ -100,7 +100,7 @@ export class VideoImportTorrentComponent extends VideoSend implements OnInit, Ca
previewUrl: null
}))
this.videoPrivacies = this.videoService.explainedPrivacyLabels(this.videoPrivacies)
this.explainedVideoPrivacies = this.videoService.explainedPrivacyLabels(this.videoPrivacies)
this.hydrateFormFromVideo()
},

View File

@ -51,7 +51,7 @@
<form [hidden]="!hasImportedVideo" novalidate [formGroup]="form">
<my-video-edit
[form]="form" [formErrors]="formErrors" [videoCaptions]="videoCaptions" [schedulePublicationPossible]="false"
[validationMessages]="validationMessages" [videoPrivacies]="videoPrivacies" [userVideoChannels]="userVideoChannels"
[validationMessages]="validationMessages" [videoPrivacies]="explainedVideoPrivacies" [userVideoChannels]="userVideoChannels"
></my-video-edit>
<div class="submit-container">

View File

@ -91,7 +91,7 @@ export class VideoImportUrlComponent extends VideoSend implements OnInit, CanCom
previewUrl: null
}))
this.videoPrivacies = this.videoService.explainedPrivacyLabels(this.videoPrivacies)
this.explainedVideoPrivacies = this.videoService.explainedPrivacyLabels(this.videoPrivacies)
this.hydrateFormFromVideo()
},

View File

@ -14,6 +14,7 @@ import { CanComponentDeactivateResult } from '@app/shared/guards/can-deactivate-
export abstract class VideoSend extends FormReactive implements OnInit {
userVideoChannels: { id: number, label: string, support: string }[] = []
videoPrivacies: VideoConstant<VideoPrivacy>[] = []
explainedVideoPrivacies: VideoConstant<VideoPrivacy>[] = []
videoCaptions: VideoCaptionEdit[] = []
firstStepPrivacyId = 0

View File

@ -50,7 +50,7 @@
<form [hidden]="!isUploadingVideo" novalidate [formGroup]="form">
<my-video-edit
[form]="form" [formErrors]="formErrors" [videoCaptions]="videoCaptions"
[validationMessages]="validationMessages" [videoPrivacies]="videoPrivacies" [userVideoChannels]="userVideoChannels"
[validationMessages]="validationMessages" [videoPrivacies]="explainedVideoPrivacies" [userVideoChannels]="userVideoChannels"
[waitTranscodingEnabled]="waitTranscodingEnabled"
></my-video-edit>

View File

@ -190,7 +190,7 @@ export class VideoUploadComponent extends VideoSend implements OnInit, OnDestroy
channelId
})
this.videoPrivacies = this.videoService.explainedPrivacyLabels(this.videoPrivacies)
this.explainedVideoPrivacies = this.videoService.explainedPrivacyLabels(this.videoPrivacies)
this.videoUploadObservable = this.videoService.uploadVideo(formData).subscribe(
event => {

View File

@ -7,7 +7,7 @@
<my-video-edit
[form]="form" [formErrors]="formErrors" [schedulePublicationPossible]="schedulePublicationPossible"
[validationMessages]="validationMessages" [videoPrivacies]="videoPrivacies" [userVideoChannels]="userVideoChannels"
[validationMessages]="validationMessages" [videoPrivacies]="explainedVideoPrivacies" [userVideoChannels]="userVideoChannels"
[videoCaptions]="videoCaptions" [waitTranscodingEnabled]="waitTranscodingEnabled"
></my-video-edit>

View File

@ -24,6 +24,7 @@ export class VideoUpdateComponent extends FormReactive implements OnInit {
isUpdatingVideo = false
videoPrivacies: VideoConstant<VideoPrivacy>[] = []
explainedVideoPrivacies: VideoConstant<VideoPrivacy>[] = []
userVideoChannels: { id: number, label: string, support: string }[] = []
schedulePublicationPossible = false
videoCaptions: VideoCaptionEdit[] = []
@ -65,7 +66,7 @@ export class VideoUpdateComponent extends FormReactive implements OnInit {
this.schedulePublicationPossible = this.video.privacy === VideoPrivacy.PRIVATE
}
this.videoPrivacies = this.videoService.explainedPrivacyLabels(this.videoPrivacies)
this.explainedVideoPrivacies = this.videoService.explainedPrivacyLabels(this.videoPrivacies)
const videoFiles = (video as VideoDetails).files
if (videoFiles.length > 1) { // Already transcoded