mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-06 11:59:58 +02:00
Add ability to update torrents cache in client
This commit is contained in:
parent
d9a2a03196
commit
b3d5cb92b1
12 changed files with 41 additions and 4 deletions
|
@ -38,6 +38,20 @@
|
|||
|
||||
<div *ngIf="formErrors.cache.captions.size" class="form-error">{{ formErrors.cache.captions.size }}</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" formGroupName="torrents">
|
||||
<label i18n for="cacheTorrentsSize">Number of video torrents to keep in cache</label>
|
||||
|
||||
<div class="number-with-unit">
|
||||
<input
|
||||
type="number" min="0" id="cacheTorrentsSize" class="form-control"
|
||||
formControlName="size" [ngClass]="{ 'input-error': formErrors['cache.torrents.size'] }"
|
||||
>
|
||||
<span i18n>{getCacheSize('torrents'), plural, =1 {cached torrent} other {cached torrents}}</span>
|
||||
</div>
|
||||
|
||||
<div *ngIf="formErrors.cache.torrents.size" class="form-error">{{ formErrors.cache.torrents.size }}</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -12,7 +12,7 @@ export class EditAdvancedConfigurationComponent {
|
|||
@Input() form: FormGroup
|
||||
@Input() formErrors: any
|
||||
|
||||
getCacheSize (type: 'captions' | 'previews') {
|
||||
getCacheSize (type: 'captions' | 'previews' | 'torrents') {
|
||||
return this.form.value['cache'][type]['size']
|
||||
}
|
||||
}
|
||||
|
|
|
@ -105,6 +105,9 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit {
|
|||
},
|
||||
captions: {
|
||||
size: CACHE_CAPTIONS_SIZE_VALIDATOR
|
||||
},
|
||||
torrents: {
|
||||
size: CACHE_CAPTIONS_SIZE_VALIDATOR
|
||||
}
|
||||
},
|
||||
signup: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue