Fix explained privacies on first upload screen

pull/1787/head
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"> <form [hidden]="!hasImportedVideo" novalidate [formGroup]="form">
<my-video-edit <my-video-edit
[form]="form" [formErrors]="formErrors" [videoCaptions]="videoCaptions" [schedulePublicationPossible]="false" [form]="form" [formErrors]="formErrors" [videoCaptions]="videoCaptions" [schedulePublicationPossible]="false"
[validationMessages]="validationMessages" [videoPrivacies]="videoPrivacies" [userVideoChannels]="userVideoChannels" [validationMessages]="validationMessages" [videoPrivacies]="explainedVideoPrivacies" [userVideoChannels]="userVideoChannels"
></my-video-edit> ></my-video-edit>
<div class="submit-container"> <div class="submit-container">

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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