]>
Commit | Line | Data |
---|---|---|
5f46d28c C |
1 | <ng-container [formGroup]="form"> |
2 | ||
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. | |
8 | </div> | |
9 | </div> | |
10 | ||
11 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> | |
12 | ||
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> | |
70e33515 | 16 | |
5f46d28c C |
17 | <div class="number-with-unit"> |
18 | <input | |
19 | type="number" min="0" id="cachePreviewsSize" class="form-control" | |
20 | formControlName="size" [ngClass]="{ 'input-error': formErrors['cache.previews.size'] }" | |
21 | > | |
70e33515 | 22 | <span i18n>{getCacheSize('previews'), plural, =1 {cached image} other {cached images}}</span> |
5f46d28c | 23 | </div> |
70e33515 | 24 | |
5f46d28c C |
25 | <div *ngIf="formErrors.cache.previews.size" class="form-error">{{ formErrors.cache.previews.size }}</div> |
26 | </div> | |
27 | ||
28 | <div class="form-group" formGroupName="captions"> | |
29 | <label i18n for="cacheCaptionsSize">Number of video captions to keep in cache</label> | |
70e33515 | 30 | |
5f46d28c C |
31 | <div class="number-with-unit"> |
32 | <input | |
33 | type="number" min="0" id="cacheCaptionsSize" class="form-control" | |
34 | formControlName="size" [ngClass]="{ 'input-error': formErrors['cache.captions.size'] }" | |
35 | > | |
70e33515 | 36 | <span i18n>{getCacheSize('captions'), plural, =1 {cached caption} other {cached captions}}</span> |
5f46d28c | 37 | </div> |
70e33515 | 38 | |
5f46d28c C |
39 | <div *ngIf="formErrors.cache.captions.size" class="form-error">{{ formErrors.cache.captions.size }}</div> |
40 | </div> | |
41 | </ng-container> | |
42 | ||
43 | </div> | |
44 | </div> | |
45 | ||
46 | <div class="form-row mt-4"> <!-- cache grid --> | |
47 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
48 | <div class="anchor" id="customizations"></div> <!-- customizations anchor --> | |
49 | <div i18n class="inner-form-title">CUSTOMIZATIONS</div> | |
50 | <div i18n class="inner-form-description"> | |
51 | Slight modifications to your PeerTube instance for when creating a plugin or theme is overkill. | |
52 | </div> | |
53 | </div> | |
54 | ||
55 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> | |
56 | ||
57 | <ng-container formGroupName="instance"> | |
58 | <ng-container formGroupName="customizations"> | |
59 | <div class="form-group"> | |
60 | <label i18n for="customizationJavascript">JavaScript</label> | |
61 | <my-help> | |
62 | <ng-template ptTemplate="customHtml"> | |
63 | <ng-container i18n> | |
64 | Write JavaScript code directly.<br />Example: <pre>console.log('my instance is amazing');</pre> | |
65 | </ng-container> | |
66 | </ng-template> | |
67 | </my-help> | |
68 | ||
69 | <textarea | |
70 | id="customizationJavascript" formControlName="javascript" class="form-control" | |
71 | [ngClass]="{ 'input-error': formErrors['instance.customizations.javascript'] }" | |
72 | ></textarea> | |
73 | ||
74 | <div *ngIf="formErrors.instance.customizations.javascript" class="form-error">{{ formErrors.instance.customizations.javascript }}</div> | |
75 | </div> | |
76 | ||
77 | <div class="form-group"> | |
78 | <label for="customizationCSS">CSS</label> | |
79 | ||
80 | <my-help> | |
81 | <ng-template ptTemplate="customHtml"> | |
82 | <ng-container i18n> | |
83 | Write CSS code directly. Example:<br /><br /> | |
84 | <pre> | |
85 | #custom-css {{ '{' }} | |
86 | color: red; | |
87 | {{ '}' }} | |
88 | </pre> | |
89 | Prepend with <em>#custom-css</em> to override styles. Example:<br /><br /> | |
90 | <pre> | |
91 | #custom-css .logged-in-email {{ '{' }} | |
92 | color: red; | |
93 | {{ '}' }} | |
94 | </pre> | |
95 | </ng-container> | |
96 | </ng-template> | |
97 | </my-help> | |
98 | ||
99 | <textarea | |
100 | id="customizationCSS" formControlName="css" class="form-control" | |
101 | [ngClass]="{ 'input-error': formErrors['instance.customizations.css'] }" | |
102 | ></textarea> | |
103 | <div *ngIf="formErrors.instance.customizations.css" class="form-error">{{ formErrors.instance.customizations.css }}</div> | |
104 | </div> | |
105 | </ng-container> | |
106 | </ng-container> | |
107 | ||
108 | </div> | |
109 | </div> | |
110 | ||
111 | </ng-container> |