From c9bc850e93295661e743255b8623ac8e2a95c391 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 15 Dec 2020 09:23:28 +0100 Subject: Use -1 for max live duration unlimited --- .../edit-custom-config/edit-custom-config.component.html | 15 ++++++--------- .../edit-custom-config/edit-custom-config.component.scss | 3 ++- .../edit-custom-config/edit-custom-config.component.ts | 6 +----- 3 files changed, 9 insertions(+), 15 deletions(-) (limited to 'client/src/app/+admin/config') diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html index bba7365f6..af8a4e18d 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html +++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html @@ -697,7 +697,7 @@ - Transcoding + VOD Transcoding @@ -924,14 +924,11 @@
-
- -
+ +
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.scss b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.scss index 3d570f571..4c64bd2e0 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.scss +++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.scss @@ -18,7 +18,8 @@ input[type=text] { } input[type=number] { - @include peertube-input-text(315px); + @include peertube-input-text($form-base-input-width); + display: block; } diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts index 7920600fc..c3a833843 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts +++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts @@ -98,7 +98,7 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit, A ] this.liveMaxDurationOptions = [ - { value: null, label: $localize`No limit` }, + { value: -1, label: $localize`No limit` }, { value: 1000 * 3600, label: $localize`1 hour` }, { value: 1000 * 3600 * 3, label: $localize`3 hours` }, { value: 1000 * 3600 * 5, label: $localize`5 hours` }, @@ -359,10 +359,6 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit, A async formValidated () { const value: CustomConfig = this.form.getRawValue() - // Transform "null" to null - const maxDuration = value.live.maxDuration as any - if (maxDuration === 'null') value.live.maxDuration = null - this.configService.updateCustomConfig(value) .subscribe( res => { -- cgit v1.2.3