1 <ng-container [formGroup]=
"form">
3 <div class=
"row mt-5"> <!-- cache grid -->
5 <div class=
"col-12 col-lg-4 col-xl-3">
6 <h2 i18n
class=
"inner-form-title">CACHE
</h2>
7 <div i18n
class=
"inner-form-description">
8 Some files are not federated, and fetched when necessary. Define their caching policies.
12 <div class=
"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>
17 <div class=
"number-with-unit">
19 type=
"number" min=
"0" id=
"cachePreviewsSize" class=
"form-control"
20 formControlName=
"size" [ngClass]=
"{ 'input-error': formErrors['cache.previews.size'] }"
22 <span i18n
>{getCacheSize('previews'), plural, =
1 {cached image} other {cached images}}
</span>
25 <div *
ngIf=
"formErrors.cache.previews.size" class=
"form-error">{{ formErrors.cache.previews.size }}
</div>
28 <div class=
"form-group" formGroupName=
"captions">
29 <label i18n
for=
"cacheCaptionsSize">Number of video captions to keep in cache
</label>
31 <div class=
"number-with-unit">
33 type=
"number" min=
"0" id=
"cacheCaptionsSize" class=
"form-control"
34 formControlName=
"size" [ngClass]=
"{ 'input-error': formErrors['cache.captions.size'] }"
36 <span i18n
>{getCacheSize('captions'), plural, =
1 {cached caption} other {cached captions}}
</span>
39 <div *
ngIf=
"formErrors.cache.captions.size" class=
"form-error">{{ formErrors.cache.captions.size }}
</div>
42 <div class=
"form-group" formGroupName=
"torrents">
43 <label i18n
for=
"cacheTorrentsSize">Number of video torrents to keep in cache
</label>
45 <div class=
"number-with-unit">
47 type=
"number" min=
"0" id=
"cacheTorrentsSize" class=
"form-control"
48 formControlName=
"size" [ngClass]=
"{ 'input-error': formErrors['cache.torrents.size'] }"
50 <span i18n
>{getCacheSize('torrents'), plural, =
1 {cached torrent} other {cached torrents}}
</span>
53 <div *
ngIf=
"formErrors.cache.torrents.size" class=
"form-error">{{ formErrors.cache.torrents.size }}
</div>
60 <div class=
"row mt-4"> <!-- cache grid -->
61 <div class=
"col-12 col-lg-4 col-xl-3">
62 <div class=
"anchor" id=
"customizations"></div> <!-- customizations anchor -->
63 <h2 i18n
class=
"inner-form-title">CUSTOMIZATIONS
</h2>
64 <div i18n
class=
"inner-form-description">
65 Slight modifications to your PeerTube instance for when creating a plugin or theme is overkill.
69 <div class=
"col-12 col-lg-8 col-xl-9">
70 <ng-container formGroupName=
"instance">
71 <ng-container formGroupName=
"customizations">
72 <div class=
"form-group">
73 <label i18n
for=
"customizationJavascript">JavaScript
</label>
75 <ng-template ptTemplate=
"customHtml">
77 Write JavaScript code directly.
<br />Example:
<pre>console.log('my instance is amazing');
</pre>
83 id=
"customizationJavascript" formControlName=
"javascript" class=
"form-control"
84 [ngClass]=
"{ 'input-error': formErrors['instance.customizations.javascript'] }"
87 <div *
ngIf=
"formErrors.instance.customizations.javascript" class=
"form-error">{{ formErrors.instance.customizations.javascript }}
</div>
90 <div class=
"form-group">
91 <label for=
"customizationCSS">CSS
</label>
94 <ng-template ptTemplate=
"customHtml">
96 Write CSS code directly. Example:
<br /><br />
102 Prepend with
<em>#custom-css
</em> to override styles. Example:
<br /><br />
104 #custom-css .logged-in-email {{ '{' }}
113 id=
"customizationCSS" formControlName=
"css" class=
"form-control"
114 [ngClass]=
"{ 'input-error': formErrors['instance.customizations.css'] }"
116 <div *
ngIf=
"formErrors.instance.customizations.css" class=
"form-error">{{ formErrors.instance.customizations.css }}
</div>