aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+admin')
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-advanced-configuration.component.html14
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-advanced-configuration.component.ts2
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts3
3 files changed, 18 insertions, 1 deletions
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-advanced-configuration.component.html b/client/src/app/+admin/config/edit-custom-config/edit-advanced-configuration.component.html
index 6018ff5e0..0ab80e5a9 100644
--- a/client/src/app/+admin/config/edit-custom-config/edit-advanced-configuration.component.html
+++ b/client/src/app/+admin/config/edit-custom-config/edit-advanced-configuration.component.html
@@ -38,6 +38,20 @@
38 38
39 <div *ngIf="formErrors.cache.captions.size" class="form-error">{{ formErrors.cache.captions.size }}</div> 39 <div *ngIf="formErrors.cache.captions.size" class="form-error">{{ formErrors.cache.captions.size }}</div>
40 </div> 40 </div>
41
42 <div class="form-group" formGroupName="torrents">
43 <label i18n for="cacheTorrentsSize">Number of video torrents to keep in cache</label>
44
45 <div class="number-with-unit">
46 <input
47 type="number" min="0" id="cacheTorrentsSize" class="form-control"
48 formControlName="size" [ngClass]="{ 'input-error': formErrors['cache.torrents.size'] }"
49 >
50 <span i18n>{getCacheSize('torrents'), plural, =1 {cached torrent} other {cached torrents}}</span>
51 </div>
52
53 <div *ngIf="formErrors.cache.torrents.size" class="form-error">{{ formErrors.cache.torrents.size }}</div>
54 </div>
41 </ng-container> 55 </ng-container>
42 56
43 </div> 57 </div>
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-advanced-configuration.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-advanced-configuration.component.ts
index 934438a50..01ff022c5 100644
--- a/client/src/app/+admin/config/edit-custom-config/edit-advanced-configuration.component.ts
+++ b/client/src/app/+admin/config/edit-custom-config/edit-advanced-configuration.component.ts
@@ -12,7 +12,7 @@ export class EditAdvancedConfigurationComponent {
12 @Input() form: FormGroup 12 @Input() form: FormGroup
13 @Input() formErrors: any 13 @Input() formErrors: any
14 14
15 getCacheSize (type: 'captions' | 'previews') { 15 getCacheSize (type: 'captions' | 'previews' | 'torrents') {
16 return this.form.value['cache'][type]['size'] 16 return this.form.value['cache'][type]['size']
17 } 17 }
18} 18}
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 2c7a10937..4b35d65fc 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
@@ -105,6 +105,9 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit {
105 }, 105 },
106 captions: { 106 captions: {
107 size: CACHE_CAPTIONS_SIZE_VALIDATOR 107 size: CACHE_CAPTIONS_SIZE_VALIDATOR
108 },
109 torrents: {
110 size: CACHE_CAPTIONS_SIZE_VALIDATOR
108 } 111 }
109 }, 112 },
110 signup: { 113 signup: {