mirror of https://github.com/Chocobozzz/PeerTube
Fix explained privacies on first upload screen
parent
ff40a4ebab
commit
71d00bfd7f
|
@ -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">
|
||||||
|
|
|
@ -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()
|
||||||
},
|
},
|
||||||
|
|
|
@ -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">
|
||||||
|
|
|
@ -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()
|
||||||
},
|
},
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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>
|
||||||
|
|
||||||
|
|
|
@ -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 => {
|
||||||
|
|
|
@ -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>
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue