1 <ng-container [formGroup]=
"form">
3 <div class=
"form-row mt-5"> <!-- cache grid -->
4 <div class=
"form-group col-12 col-lg-4 col-xl-3">
5 <div i18n
class=
"inner-form-title">CACHE
</div>
6 <div i18n
class=
"inner-form-description">
7 Some files are not federated, and fetched when necessary. Define their caching policies.
11 <div class=
"form-group form-group-right col-12 col-lg-8 col-xl-9">
13 <ng-container formGroupName=
"cache">
14 <div class=
"form-group" formGroupName=
"previews">
15 <label i18n
for=
"cachePreviewsSize">Number of previews to keep in cache
</label>
16 <div class=
"number-with-unit">
18 type=
"number" min=
"0" id=
"cachePreviewsSize" class=
"form-control"
19 formControlName=
"size" [ngClass]=
"{ 'input-error': formErrors['cache.previews.size'] }"
21 <span i18n
>{form.value['cache']['previews']['size'], plural, =
1 {cached image} other {cached images}}
</span>
23 <div *
ngIf=
"formErrors.cache.previews.size" class=
"form-error">{{ formErrors.cache.previews.size }}
</div>
26 <div class=
"form-group" formGroupName=
"captions">
27 <label i18n
for=
"cacheCaptionsSize">Number of video captions to keep in cache
</label>
28 <div class=
"number-with-unit">
30 type=
"number" min=
"0" id=
"cacheCaptionsSize" class=
"form-control"
31 formControlName=
"size" [ngClass]=
"{ 'input-error': formErrors['cache.captions.size'] }"
33 <span i18n
>{form.value['cache']['captions']['size'], plural, =
1 {cached image} other {cached images}}
</span>
35 <div *
ngIf=
"formErrors.cache.captions.size" class=
"form-error">{{ formErrors.cache.captions.size }}
</div>
42 <div class=
"form-row mt-4"> <!-- cache grid -->
43 <div class=
"form-group col-12 col-lg-4 col-xl-3">
44 <div class=
"anchor" id=
"customizations"></div> <!-- customizations anchor -->
45 <div i18n
class=
"inner-form-title">CUSTOMIZATIONS
</div>
46 <div i18n
class=
"inner-form-description">
47 Slight modifications to your PeerTube instance for when creating a plugin or theme is overkill.
51 <div class=
"form-group form-group-right col-12 col-lg-8 col-xl-9">
53 <ng-container formGroupName=
"instance">
54 <ng-container formGroupName=
"customizations">
55 <div class=
"form-group">
56 <label i18n
for=
"customizationJavascript">JavaScript
</label>
58 <ng-template ptTemplate=
"customHtml">
60 Write JavaScript code directly.
<br />Example:
<pre>console.log('my instance is amazing');
</pre>
66 id=
"customizationJavascript" formControlName=
"javascript" class=
"form-control"
67 [ngClass]=
"{ 'input-error': formErrors['instance.customizations.javascript'] }"
70 <div *
ngIf=
"formErrors.instance.customizations.javascript" class=
"form-error">{{ formErrors.instance.customizations.javascript }}
</div>
73 <div class=
"form-group">
74 <label for=
"customizationCSS">CSS
</label>
77 <ng-template ptTemplate=
"customHtml">
79 Write CSS code directly. Example:
<br /><br />
85 Prepend with
<em>#custom-css
</em> to override styles. Example:
<br /><br />
87 #custom-css .logged-in-email {{ '{' }}
96 id=
"customizationCSS" formControlName=
"css" class=
"form-control"
97 [ngClass]=
"{ 'input-error': formErrors['instance.customizations.css'] }"
99 <div *
ngIf=
"formErrors.instance.customizations.css" class=
"form-error">{{ formErrors.instance.customizations.css }}
</div>