Do not display wait transcoding checkbox

If this is a live and save replay is not enabled
This commit is contained in:
Chocobozzz 2020-11-26 09:30:26 +01:00
parent ae48a71d57
commit 0151c41c65
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 11 additions and 1 deletions

View File

@ -136,7 +136,7 @@
</ng-template>
</my-peertube-checkbox>
<my-peertube-checkbox *ngIf="waitTranscodingEnabled" inputName="waitTranscoding" formControlName="waitTranscoding" helpPlacement="bottom-right">
<my-peertube-checkbox *ngIf="isWaitTranscodingDisplayed()" inputName="waitTranscoding" formControlName="waitTranscoding" helpPlacement="bottom-right">
<ng-template ptTemplate="label">
<ng-container i18n>Publish after transcoding</ng-container>
</ng-template>

View File

@ -102,6 +102,16 @@ export class VideoEditComponent implements OnInit, OnDestroy {
.map(c => c.language.id)
}
isWaitTranscodingDisplayed () {
if (!this.waitTranscodingEnabled) return false
if (this.liveVideo) {
return this.form.value['saveReplay'] === true
}
return true
}
updateForm () {
const defaultValues: any = {
nsfw: 'false',