diff options
author | Chocobozzz <me@florianbigard.com> | 2020-12-15 09:23:28 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-12-15 09:26:37 +0100 |
commit | c9bc850e93295661e743255b8623ac8e2a95c391 (patch) | |
tree | 0dd03d2addfa03e0c92947b787af46414253a1c2 /client/src/app/+admin/config/edit-custom-config | |
parent | d1742ede65d2a42ffc02ab230287d83d432416f1 (diff) | |
download | PeerTube-c9bc850e93295661e743255b8623ac8e2a95c391.tar.gz PeerTube-c9bc850e93295661e743255b8623ac8e2a95c391.tar.zst PeerTube-c9bc850e93295661e743255b8623ac8e2a95c391.zip |
Use -1 for max live duration unlimited
Diffstat (limited to 'client/src/app/+admin/config/edit-custom-config')
3 files changed, 9 insertions, 15 deletions
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 @@ | |||
697 | </ng-container> | 697 | </ng-container> |
698 | 698 | ||
699 | <ng-container ngbNavItem="transcoding"> | 699 | <ng-container ngbNavItem="transcoding"> |
700 | <a ngbNavLink i18n>Transcoding</a> | 700 | <a ngbNavLink i18n>VOD Transcoding</a> |
701 | 701 | ||
702 | <ng-template ngbNavContent> | 702 | <ng-template ngbNavContent> |
703 | 703 | ||
@@ -924,14 +924,11 @@ | |||
924 | 924 | ||
925 | <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isLiveEnabled() }"> | 925 | <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isLiveEnabled() }"> |
926 | <label i18n for="liveMaxDuration">Max live duration</label> | 926 | <label i18n for="liveMaxDuration">Max live duration</label> |
927 | <div> | 927 | |
928 | <ng-select | 928 | <ng-select |
929 | labelForId="liveMaxDuration" [items]="liveMaxDurationOptions" formControlName="maxDuration" | 929 | labelForId="liveMaxDuration" [items]="liveMaxDurationOptions" formControlName="maxDuration" |
930 | bindLabel="label" bindValue="value" | 930 | bindLabel="label" bindValue="value" [clearable]="false" [searchable]="false" |
931 | [clearable]="false" | 931 | ></ng-select> |
932 | [searchable]="false" | ||
933 | ></ng-select> | ||
934 | </div> | ||
935 | </div> | 932 | </div> |
936 | 933 | ||
937 | </ng-container> | 934 | </ng-container> |
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] { | |||
18 | } | 18 | } |
19 | 19 | ||
20 | input[type=number] { | 20 | input[type=number] { |
21 | @include peertube-input-text(315px); | 21 | @include peertube-input-text($form-base-input-width); |
22 | |||
22 | display: block; | 23 | display: block; |
23 | } | 24 | } |
24 | 25 | ||
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 | |||
98 | ] | 98 | ] |
99 | 99 | ||
100 | this.liveMaxDurationOptions = [ | 100 | this.liveMaxDurationOptions = [ |
101 | { value: null, label: $localize`No limit` }, | 101 | { value: -1, label: $localize`No limit` }, |
102 | { value: 1000 * 3600, label: $localize`1 hour` }, | 102 | { value: 1000 * 3600, label: $localize`1 hour` }, |
103 | { value: 1000 * 3600 * 3, label: $localize`3 hours` }, | 103 | { value: 1000 * 3600 * 3, label: $localize`3 hours` }, |
104 | { value: 1000 * 3600 * 5, label: $localize`5 hours` }, | 104 | { value: 1000 * 3600 * 5, label: $localize`5 hours` }, |
@@ -359,10 +359,6 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit, A | |||
359 | async formValidated () { | 359 | async formValidated () { |
360 | const value: CustomConfig = this.form.getRawValue() | 360 | const value: CustomConfig = this.form.getRawValue() |
361 | 361 | ||
362 | // Transform "null" to null | ||
363 | const maxDuration = value.live.maxDuration as any | ||
364 | if (maxDuration === 'null') value.live.maxDuration = null | ||
365 | |||
366 | this.configService.updateCustomConfig(value) | 362 | this.configService.updateCustomConfig(value) |
367 | .subscribe( | 363 | .subscribe( |
368 | res => { | 364 | res => { |