aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+videos/+video-edit/shared
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-01-26 10:56:55 +0100
committerChocobozzz <me@florianbigard.com>2021-01-26 10:56:55 +0100
commitddb62a85c5517d3437feb7d487a8a11881b68fcb (patch)
treeb27bc798a85224a2fe5406ef5a9be49d17b48d66 /client/src/app/+videos/+video-edit/shared
parente08ff02a9f1fb1cfbdfa8f0f602eda9419ba6cc3 (diff)
downloadPeerTube-ddb62a85c5517d3437feb7d487a8a11881b68fcb.tar.gz
PeerTube-ddb62a85c5517d3437feb7d487a8a11881b68fcb.tar.zst
PeerTube-ddb62a85c5517d3437feb7d487a8a11881b68fcb.zip
Fix wait transcoding checkbox display
Diffstat (limited to 'client/src/app/+videos/+video-edit/shared')
-rw-r--r--client/src/app/+videos/+video-edit/shared/video-edit.component.html4
-rw-r--r--client/src/app/+videos/+video-edit/shared/video-edit.component.ts22
2 files changed, 8 insertions, 18 deletions
diff --git a/client/src/app/+videos/+video-edit/shared/video-edit.component.html b/client/src/app/+videos/+video-edit/shared/video-edit.component.html
index 9c2aea526..6208ab69b 100644
--- a/client/src/app/+videos/+video-edit/shared/video-edit.component.html
+++ b/client/src/app/+videos/+video-edit/shared/video-edit.component.html
@@ -136,7 +136,7 @@
136 </ng-template> 136 </ng-template>
137 </my-peertube-checkbox> 137 </my-peertube-checkbox>
138 138
139 <my-peertube-checkbox *ngIf="isWaitTranscodingDisplayed()" inputName="waitTranscoding" formControlName="waitTranscoding" helpPlacement="bottom-right"> 139 <my-peertube-checkbox *ngIf="waitTranscodingEnabled" inputName="waitTranscoding" formControlName="waitTranscoding" helpPlacement="bottom-right">
140 <ng-template ptTemplate="label"> 140 <ng-template ptTemplate="label">
141 <ng-container i18n>Publish after transcoding</ng-container> 141 <ng-container i18n>Publish after transcoding</ng-container>
142 </ng-template> 142 </ng-template>
@@ -347,5 +347,5 @@
347</div> 347</div>
348 348
349<my-video-caption-add-modal 349<my-video-caption-add-modal
350 #videoCaptionAddModal [existingCaptions]="existingCaptions" [serverConfig]="serverConfig" (captionAdded)="onCaptionAdded($event)" 350 #videoCaptionAddModal [existingCaptions]="getExistingCaptions()" [serverConfig]="serverConfig" (captionAdded)="onCaptionAdded($event)"
351></my-video-caption-add-modal> 351></my-video-caption-add-modal>
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 5294a57a1..80b5dce46 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
@@ -96,22 +96,6 @@ export class VideoEditComponent implements OnInit, OnDestroy {
96 this.calendarDateFormat = this.i18nPrimengCalendarService.getDateFormat() 96 this.calendarDateFormat = this.i18nPrimengCalendarService.getDateFormat()
97 } 97 }
98 98
99 get existingCaptions () {
100 return this.videoCaptions
101 .filter(c => c.action !== 'REMOVE')
102 .map(c => c.language.id)
103 }
104
105 isWaitTranscodingDisplayed () {
106 if (!this.waitTranscodingEnabled) return false
107
108 if (this.liveVideo) {
109 return this.form.value['saveReplay'] === true
110 }
111
112 return true
113 }
114
115 updateForm () { 99 updateForm () {
116 const defaultValues: any = { 100 const defaultValues: any = {
117 nsfw: 'false', 101 nsfw: 'false',
@@ -217,6 +201,12 @@ export class VideoEditComponent implements OnInit, OnDestroy {
217 if (this.schedulerInterval) clearInterval(this.schedulerInterval) 201 if (this.schedulerInterval) clearInterval(this.schedulerInterval)
218 } 202 }
219 203
204 getExistingCaptions () {
205 return this.videoCaptions
206 .filter(c => c.action !== 'REMOVE')
207 .map(c => c.language.id)
208 }
209
220 onCaptionAdded (caption: VideoCaptionEdit) { 210 onCaptionAdded (caption: VideoCaptionEdit) {
221 const existingCaption = this.videoCaptions.find(c => c.language.id === caption.language.id) 211 const existingCaption = this.videoCaptions.find(c => c.language.id === caption.language.id)
222 212