]>
Commit | Line | Data |
---|---|---|
1 | <h1 class="sr-only" i18n>Configuration</h1> | |
2 | <form role="form" [formGroup]="form"> | |
3 | ||
4 | <div ngbNav #nav="ngbNav" class="nav-tabs"> | |
5 | ||
6 | <ng-container ngbNavItem="instance-information"> | |
7 | <a ngbNavLink i18n>Instance information</a> | |
8 | ||
9 | <ng-template ngbNavContent> | |
10 | ||
11 | <ng-container formGroupName="instance"> | |
12 | ||
13 | <div class="form-row mt-5"> <!-- instance grid --> | |
14 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
15 | <div i18n class="inner-form-title">INSTANCE</div> | |
16 | </div> | |
17 | ||
18 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> | |
19 | ||
20 | <div class="form-group"> | |
21 | <label i18n for="instanceName">Name</label> | |
22 | <input | |
23 | type="text" id="instanceName" class="form-control" | |
24 | formControlName="name" [ngClass]="{ 'input-error': formErrors.instance.name }" | |
25 | > | |
26 | <div *ngIf="formErrors.instance.name" class="form-error">{{ formErrors.instance.name }}</div> | |
27 | </div> | |
28 | ||
29 | <div class="form-group"> | |
30 | <label i18n for="instanceShortDescription">Short description</label> | |
31 | <textarea | |
32 | id="instanceShortDescription" formControlName="shortDescription" class="form-control small" | |
33 | [ngClass]="{ 'input-error': formErrors['instance.shortDescription'] }" | |
34 | ></textarea> | |
35 | <div *ngIf="formErrors.instance.shortDescription" class="form-error">{{ formErrors.instance.shortDescription }}</div> | |
36 | </div> | |
37 | ||
38 | <div class="form-group"> | |
39 | <label i18n for="instanceDescription">Description</label><my-help helpType="markdownText"></my-help> | |
40 | <my-markdown-textarea | |
41 | name="instanceDescription" formControlName="description" textareaMaxWidth="500px" | |
42 | [classes]="{ 'input-error': formErrors['instance.description'] }" | |
43 | ></my-markdown-textarea> | |
44 | <div *ngIf="formErrors.instance.description" class="form-error">{{ formErrors.instance.description }}</div> | |
45 | </div> | |
46 | ||
47 | <div class="form-group"> | |
48 | <label i18n for="instanceCategories">Main instance categories</label> | |
49 | ||
50 | <div> | |
51 | <my-select-checkbox | |
52 | id="instanceCategories" | |
53 | formControlName="categories" [availableItems]="categoryItems" | |
54 | [selectableGroup]="false" | |
55 | i18n-placeholder placeholder="Add a new category" | |
56 | > | |
57 | </my-select-checkbox> | |
58 | </div> | |
59 | </div> | |
60 | ||
61 | <div class="form-group"> | |
62 | <label i18n for="instanceLanguages">Main languages you/your moderators speak</label> | |
63 | ||
64 | <div> | |
65 | <my-select-checkbox | |
66 | id="instanceLanguages" | |
67 | formControlName="languages" [availableItems]="languageItems" | |
68 | [selectableGroup]="false" | |
69 | i18n-placeholder placeholder="Add a new language" | |
70 | > | |
71 | </my-select-checkbox> | |
72 | </div> | |
73 | </div> | |
74 | ||
75 | </div> | |
76 | </div> | |
77 | ||
78 | <div class="form-row mt-4"> <!-- moderation & nsfw grid --> | |
79 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
80 | <div i18n class="inner-form-title">MODERATION & NSFW</div> | |
81 | <div i18n class="inner-for-description"> | |
82 | Manage <a routerLink="/admin/users">users</a> to build a moderation team. | |
83 | </div> | |
84 | </div> | |
85 | ||
86 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> | |
87 | ||
88 | <div class="form-group"> | |
89 | <my-peertube-checkbox inputName="instanceIsNSFW" formControlName="isNSFW"> | |
90 | <ng-template ptTemplate="label"> | |
91 | <ng-container i18n>This instance is dedicated to sensitive or NSFW content</ng-container> | |
92 | </ng-template> | |
93 | ||
94 | <ng-template ptTemplate="help"> | |
95 | <ng-container i18n> | |
96 | Enabling it will allow other administrators to know that you are mainly federating sensitive content.<br /><br /> | |
97 | Moreover, the NSFW checkbox on video upload will be automatically checked by default. | |
98 | </ng-container> | |
99 | </ng-template> | |
100 | </my-peertube-checkbox> | |
101 | </div> | |
102 | ||
103 | <div class="form-group"> | |
104 | <label i18n for="instanceDefaultNSFWPolicy">Policy on videos containing sensitive content</label> | |
105 | ||
106 | <my-help> | |
107 | <ng-template ptTemplate="customHtml"> | |
108 | <ng-container i18n> | |
109 | With <strong>Do not list</strong> or <strong>Blur thumbnails</strong>, a confirmation will be requested to watch the video. | |
110 | </ng-container> | |
111 | </ng-template> | |
112 | </my-help> | |
113 | ||
114 | <div class="peertube-select-container"> | |
115 | <select id="instanceDefaultNSFWPolicy" formControlName="defaultNSFWPolicy" class="form-control"> | |
116 | <option i18n value="undefined" disabled>Policy for sensitive videos</option> | |
117 | <option i18n value="do_not_list">Do not list</option> | |
118 | <option i18n value="blur">Blur thumbnails</option> | |
119 | <option i18n value="display">Display</option> | |
120 | </select> | |
121 | </div> | |
122 | <div *ngIf="formErrors.instance.defaultNSFWPolicy" class="form-error">{{ formErrors.instance.defaultNSFWPolicy }}</div> | |
123 | </div> | |
124 | ||
125 | <div class="form-group"> | |
126 | <label i18n for="instanceTerms">Terms</label><my-help helpType="markdownText"></my-help> | |
127 | <my-markdown-textarea | |
128 | name="instanceTerms" formControlName="terms" textareaMaxWidth="500px" | |
129 | [ngClass]="{ 'input-error': formErrors['instance.terms'] }" | |
130 | ></my-markdown-textarea> | |
131 | <div *ngIf="formErrors.instance.terms" class="form-error">{{ formErrors.instance.terms }}</div> | |
132 | </div> | |
133 | ||
134 | <div class="form-group"> | |
135 | <label i18n for="instanceCodeOfConduct">Code of conduct</label><my-help helpType="markdownText"></my-help> | |
136 | <my-markdown-textarea | |
137 | name="instanceCodeOfConduct" formControlName="codeOfConduct" textareaMaxWidth="500px" | |
138 | [ngClass]="{ 'input-error': formErrors['instance.codeOfConduct'] }" | |
139 | ></my-markdown-textarea> | |
140 | <div *ngIf="formErrors.instance.codeOfConduct" class="form-error">{{ formErrors.instance.codeOfConduct }}</div> | |
141 | </div> | |
142 | ||
143 | <div class="form-group"> | |
144 | <label i18n for="instanceModerationInformation">Moderation information</label><my-help helpType="markdownText"></my-help> | |
145 | <div i18n class="label-small-info">Who moderates the instance? What is the policy regarding NSFW videos? Political videos? etc</div> | |
146 | ||
147 | <my-markdown-textarea | |
148 | name="instanceModerationInformation" formControlName="moderationInformation" textareaMaxWidth="500px" | |
149 | [ngClass]="{ 'input-error': formErrors['instance.moderationInformation'] }" | |
150 | ></my-markdown-textarea> | |
151 | <div *ngIf="formErrors.instance.moderationInformation" class="form-error">{{ formErrors.instance.moderationInformation }}</div> | |
152 | </div> | |
153 | ||
154 | </div> | |
155 | </div> | |
156 | ||
157 | <div class="form-row mt-4"> <!-- you and your instance grid --> | |
158 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
159 | <div i18n class="inner-form-title">YOU AND YOUR INSTANCE</div> | |
160 | </div> | |
161 | ||
162 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> | |
163 | ||
164 | <div class="form-group"> | |
165 | <label i18n for="instanceAdministrator">Who is behind the instance?</label> | |
166 | <div i18n class="label-small-info">A single person? A non-profit? A company?</div> | |
167 | ||
168 | <my-markdown-textarea | |
169 | name="instanceAdministrator" formControlName="administrator" textareaMaxWidth="500px" textareaHeight="75px" | |
170 | [classes]="{ 'input-error': formErrors['instance.administrator'] }" | |
171 | ></my-markdown-textarea> | |
172 | ||
173 | <div *ngIf="formErrors.instance.administrator" class="form-error">{{ formErrors.instance.administrator }}</div> | |
174 | </div> | |
175 | ||
176 | <div class="form-group"> | |
177 | <label i18n for="instanceCreationReason">Why did you create this instance?</label> | |
178 | <div i18n class="label-small-info">To share your personal videos? To open registrations and allow people to upload what they want?</div> | |
179 | ||
180 | <textarea | |
181 | id="instanceCreationReason" formControlName="creationReason" class="small" class="form-control" | |
182 | [ngClass]="{ 'input-error': formErrors['instance.creationReason'] }" | |
183 | ></textarea> | |
184 | <div *ngIf="formErrors.instance.creationReason" class="form-error">{{ formErrors.instance.creationReason }}</div> | |
185 | </div> | |
186 | ||
187 | <div class="form-group"> | |
188 | <label i18n for="instanceMaintenanceLifetime">How long do you plan to maintain this instance?</label> | |
189 | <div i18n class="label-small-info">It's important to know for users who want to register on your instance</div> | |
190 | ||
191 | <textarea | |
192 | id="instanceMaintenanceLifetime" formControlName="maintenanceLifetime" class="form-control small" | |
193 | [ngClass]="{ 'input-error': formErrors['instance.maintenanceLifetime'] }" | |
194 | ></textarea> | |
195 | <div *ngIf="formErrors.instance.maintenanceLifetime" class="form-error">{{ formErrors.instance.maintenanceLifetime }}</div> | |
196 | </div> | |
197 | ||
198 | <div class="form-group"> | |
199 | <label i18n for="instanceBusinessModel">How will you finance the PeerTube server?</label> | |
200 | <div i18n class="label-small-info">With your own funds? With user donations? Advertising?</div> | |
201 | ||
202 | <textarea | |
203 | id="instanceBusinessModel" formControlName="businessModel" class="form-control small" | |
204 | [ngClass]="{ 'input-error': formErrors['instance.businessModel'] }" | |
205 | ></textarea> | |
206 | <div *ngIf="formErrors.instance.businessModel" class="form-error">{{ formErrors.instance.businessModel }}</div> | |
207 | </div> | |
208 | ||
209 | </div> | |
210 | </div> | |
211 | ||
212 | <div class="form-row mt-4"> <!-- other information grid --> | |
213 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
214 | <div i18n class="inner-form-title">OTHER INFORMATION</div> | |
215 | </div> | |
216 | ||
217 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> | |
218 | ||
219 | <div class="form-group"> | |
220 | <label i18n for="instanceHardwareInformation">What server/hardware does the instance run on?</label> | |
221 | <div i18n class="label-small-info">i.e. 2vCore 2GB RAM, a direct the link to the server you rent, etc.</div> | |
222 | ||
223 | <my-markdown-textarea | |
224 | name="instanceHardwareInformation" formControlName="hardwareInformation" textareaMaxWidth="500px" textareaHeight="75px" | |
225 | [classes]="{ 'input-error': formErrors['instance.hardwareInformation'] }" | |
226 | ></my-markdown-textarea> | |
227 | ||
228 | <div *ngIf="formErrors.instance.hardwareInformation" class="form-error">{{ formErrors.instance.hardwareInformation }}</div> | |
229 | </div> | |
230 | ||
231 | </div> | |
232 | </div> | |
233 | ||
234 | </ng-container> | |
235 | </ng-template> | |
236 | </ng-container> | |
237 | ||
238 | <ng-container ngbNavItem="basic-configuration"> | |
239 | <a ngbNavLink i18n>Basic configuration</a> | |
240 | ||
241 | <ng-template ngbNavContent> | |
242 | ||
243 | <div class="form-row mt-5"> <!-- appearance grid --> | |
244 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
245 | <div i18n class="inner-form-title">APPEARANCE</div> | |
246 | <div i18n class="inner-for-description"> | |
247 | Use <a routerLink="/admin/plugins">plugins & themes</a> for more involved changes, or <a routerLink="/admin/config/edit-custom" fragment="customizations" (click)="gotoAnchor()">add slight customizations</a>. | |
248 | </div> | |
249 | </div> | |
250 | ||
251 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> | |
252 | ||
253 | <ng-container formGroupName="theme"> | |
254 | <div class="form-group"> | |
255 | <label i18n for="themeDefault">Theme</label> | |
256 | ||
257 | <div class="peertube-select-container"> | |
258 | <select formControlName="default" id="themeDefault" class="form-control"> | |
259 | <option i18n value="default">default</option> | |
260 | ||
261 | <option *ngFor="let theme of availableThemes" [value]="theme">{{ theme }}</option> | |
262 | </select> | |
263 | </div> | |
264 | </div> | |
265 | </ng-container> | |
266 | ||
267 | <div class="form-group" formGroupName="instance"> | |
268 | <label i18n for="instanceDefaultClientRoute">Landing page</label> | |
269 | <div class="peertube-select-container"> | |
270 | <select id="instanceDefaultClientRoute" formControlName="defaultClientRoute" class="form-control"> | |
271 | <option i18n value="/videos/overview">Discover videos</option> | |
272 | <option i18n value="/videos/trending">Trending videos</option> | |
273 | <option i18n value="/videos/most-liked">Most liked videos</option> | |
274 | <option i18n value="/videos/recently-added">Recently added videos</option> | |
275 | <option i18n value="/videos/local">Local videos</option> | |
276 | </select> | |
277 | </div> | |
278 | <div *ngIf="formErrors.instance.defaultClientRoute" class="form-error">{{ formErrors.instance.defaultClientRoute }}</div> | |
279 | </div> | |
280 | ||
281 | </div> | |
282 | </div> | |
283 | ||
284 | <div class="form-row mt-4"> <!-- broadcast grid --> | |
285 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
286 | <div i18n class="inner-form-title">BROADCAST MESSAGE</div> | |
287 | <div i18n class="inner-for-description"> | |
288 | Display a message on your instance | |
289 | </div> | |
290 | </div> | |
291 | ||
292 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> | |
293 | ||
294 | <ng-container formGroupName="broadcastMessage"> | |
295 | ||
296 | <div class="form-group"> | |
297 | <my-peertube-checkbox | |
298 | inputName="broadcastMessageEnabled" formControlName="enabled" | |
299 | i18n-labelText labelText="Enable broadcast message" | |
300 | ></my-peertube-checkbox> | |
301 | </div> | |
302 | ||
303 | <div class="form-group"> | |
304 | <my-peertube-checkbox | |
305 | inputName="broadcastMessageDismissable" formControlName="dismissable" | |
306 | i18n-labelText labelText="Allow users to dismiss the broadcast message " | |
307 | ></my-peertube-checkbox> | |
308 | </div> | |
309 | ||
310 | <div class="form-group"> | |
311 | <label i18n for="broadcastMessageLevel">Broadcast message level</label> | |
312 | <div class="peertube-select-container"> | |
313 | <select id="broadcastMessageLevel" formControlName="level" class="form-control"> | |
314 | <option value="info">info</option> | |
315 | <option value="warning">warning</option> | |
316 | <option value="error">error</option> | |
317 | </select> | |
318 | </div> | |
319 | <div *ngIf="formErrors.broadcastMessage.level" class="form-error">{{ formErrors.broadcastMessage.level }}</div> | |
320 | </div> | |
321 | ||
322 | <div class="form-group"> | |
323 | <label i18n for="broadcastMessageMessage">Message</label><my-help helpType="markdownText"></my-help> | |
324 | <my-markdown-textarea | |
325 | name="broadcastMessageMessage" formControlName="message" textareaMaxWidth="500px" | |
326 | [classes]="{ 'input-error': formErrors['broadcastMessage.message'] }" | |
327 | ></my-markdown-textarea> | |
328 | <div *ngIf="formErrors.broadcastMessage.message" class="form-error">{{ formErrors.broadcastMessage.message }}</div> | |
329 | </div> | |
330 | ||
331 | </ng-container> | |
332 | ||
333 | </div> | |
334 | </div> | |
335 | ||
336 | <div class="form-row mt-4"> <!-- new users grid --> | |
337 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
338 | <div i18n class="inner-form-title">NEW USERS</div> | |
339 | <div i18n class="inner-for-description"> | |
340 | Manage <a routerLink="/admin/users">users</a> to set their quota individually. | |
341 | </div> | |
342 | </div> | |
343 | ||
344 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> | |
345 | ||
346 | <ng-container formGroupName="signup"> | |
347 | <div class="form-group"> | |
348 | <my-peertube-checkbox | |
349 | inputName="signupEnabled" formControlName="enabled" | |
350 | i18n-labelText labelText="Enable Signup" | |
351 | > | |
352 | <ng-container ngProjectAs="description"> | |
353 | <span i18n>⚠️ This functionality requires a lot of attention and extra moderation.</span> | |
354 | </ng-container> | |
355 | <ng-container ngProjectAs="extra"> | |
356 | <my-peertube-checkbox [ngClass]="{ 'disabled-checkbox-extra': !isSignupEnabled() }" | |
357 | inputName="signupRequiresEmailVerification" formControlName="requiresEmailVerification" | |
358 | i18n-labelText labelText="Signup requires email verification" | |
359 | ></my-peertube-checkbox> | |
360 | ||
361 | <div [ngClass]="{ 'disabled-checkbox-extra': !isSignupEnabled() }" class="mt-3"> | |
362 | <label i18n for="signupLimit">Signup limit</label> | |
363 | <input | |
364 | type="number" min="-1" id="signupLimit" class="form-control" | |
365 | formControlName="limit" [ngClass]="{ 'input-error': formErrors['signup.limit'] }" | |
366 | > | |
367 | <div *ngIf="formErrors.signup.limit" class="form-error">{{ formErrors.signup.limit }}</div> | |
368 | <small *ngIf="form.value['signup']['limit'] === -1" class="text-muted">Signup won't be limited to a fixed number of users.</small> | |
369 | </div> | |
370 | </ng-container> | |
371 | </my-peertube-checkbox> | |
372 | </div> | |
373 | </ng-container> | |
374 | ||
375 | <ng-container formGroupName="user"> | |
376 | <div class="form-group"> | |
377 | <label i18n for="userVideoQuota">Default video quota per user</label> | |
378 | <div class="peertube-select-container"> | |
379 | <select id="userVideoQuota" formControlName="videoQuota" class="form-control"> | |
380 | <option *ngFor="let videoQuotaOption of videoQuotaOptions" [value]="videoQuotaOption.value" [disabled]="videoQuotaOption.disabled"> | |
381 | {{ videoQuotaOption.label }} | |
382 | </option> | |
383 | </select> | |
384 | </div> | |
385 | <div *ngIf="formErrors.user.videoQuota" class="form-error">{{ formErrors.user.videoQuota }}</div> | |
386 | </div> | |
387 | ||
388 | <div class="form-group"> | |
389 | <label i18n for="userVideoQuotaDaily">Default daily upload limit per user</label> | |
390 | <div class="peertube-select-container"> | |
391 | <select id="userVideoQuotaDaily" formControlName="videoQuotaDaily" class="form-control"> | |
392 | <option *ngFor="let videoQuotaDailyOption of videoQuotaDailyOptions" [value]="videoQuotaDailyOption.value" [disabled]="videoQuotaDailyOption.disabled"> | |
393 | {{ videoQuotaDailyOption.label }} | |
394 | </option> | |
395 | </select> | |
396 | </div> | |
397 | <div *ngIf="formErrors.user.videoQuotaDaily" class="form-error">{{ formErrors.user.videoQuotaDaily }}</div> | |
398 | </div> | |
399 | </ng-container> | |
400 | ||
401 | </div> | |
402 | </div> | |
403 | ||
404 | <div class="form-row mt-4"> <!-- videos grid --> | |
405 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
406 | <div i18n class="inner-form-title">VIDEOS</div> | |
407 | </div> | |
408 | ||
409 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> | |
410 | ||
411 | <ng-container formGroupName="import"> | |
412 | <ng-container formGroupName="videos"> | |
413 | ||
414 | <div class="form-group" formGroupName="http"> | |
415 | <my-peertube-checkbox | |
416 | inputName="importVideosHttpEnabled" formControlName="enabled" | |
417 | i18n-labelText labelText="Allow import with HTTP URL (i.e. YouTube)" | |
418 | ></my-peertube-checkbox> | |
419 | </div> | |
420 | ||
421 | <div class="form-group" formGroupName="torrent"> | |
422 | <my-peertube-checkbox | |
423 | inputName="importVideosTorrentEnabled" formControlName="enabled" | |
424 | i18n-labelText labelText="Allow import with a torrent file or a magnet URI" | |
425 | ></my-peertube-checkbox> | |
426 | </div> | |
427 | ||
428 | </ng-container> | |
429 | </ng-container> | |
430 | ||
431 | <ng-container formGroupName="autoBlacklist"> | |
432 | <ng-container formGroupName="videos"> | |
433 | <ng-container formGroupName="ofUsers"> | |
434 | ||
435 | <div class="form-group"> | |
436 | <my-peertube-checkbox | |
437 | inputName="autoBlacklistVideosOfUsersEnabled" formControlName="enabled" | |
438 | i18n-labelText labelText="Block new videos automatically" | |
439 | > | |
440 | <ng-container ngProjectAs="description"> | |
441 | <span i18n>Unless a user is marked as trusted, their videos will stay private until a moderator reviews them.</span> | |
442 | </ng-container> | |
443 | </my-peertube-checkbox> | |
444 | </div> | |
445 | ||
446 | </ng-container> | |
447 | </ng-container> | |
448 | </ng-container> | |
449 | ||
450 | </div> | |
451 | </div> | |
452 | ||
453 | <div class="form-row mt-4"> <!-- search grid --> | |
454 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
455 | <div i18n class="inner-form-title">SEARCH</div> | |
456 | </div> | |
457 | ||
458 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> | |
459 | ||
460 | <ng-container formGroupName="search"> | |
461 | <ng-container formGroupName="remoteUri"> | |
462 | ||
463 | <div class="form-group"> | |
464 | <my-peertube-checkbox | |
465 | inputName="searchRemoteUriUsers" formControlName="users" | |
466 | i18n-labelText labelText="Allow users to do remote URI/handle search" | |
467 | > | |
468 | <ng-container ngProjectAs="description"> | |
469 | <span i18n>Allow <strong>your users</strong> to look up remote videos/actors by their URI, that may not be federated with your instance</span> | |
470 | </ng-container> | |
471 | </my-peertube-checkbox> | |
472 | </div> | |
473 | ||
474 | <div class="form-group"> | |
475 | <my-peertube-checkbox | |
476 | inputName="searchRemoteUriAnonymous" formControlName="anonymous" | |
477 | i18n-labelText labelText="Allow anonymous to do remote URI/handle search" | |
478 | > | |
479 | <ng-container ngProjectAs="description"> | |
480 | <span i18n>Allow <strong>anonymous users</strong> to look up remote videos/actors by their URI, that may not be federated with your instance</span> | |
481 | </ng-container> | |
482 | </my-peertube-checkbox> | |
483 | </div> | |
484 | ||
485 | </ng-container> | |
486 | ||
487 | <ng-container formGroupName="searchIndex"> | |
488 | <div class="form-group"> | |
489 | <my-peertube-checkbox | |
490 | inputName="searchIndexEnabled" formControlName="enabled" | |
491 | i18n-labelText labelText="Enable global search" | |
492 | > | |
493 | <ng-container ngProjectAs="description"> | |
494 | <p i18n>⚠️ This functionality depends heavily on the moderation of instances followed by the search index you select.</p> | |
495 | ||
496 | <span i18n> | |
497 | You should only use moderated search indexes in production, or <a href="https://framagit.org/framasoft/peertube/search-index">host your own</a>. | |
498 | </span> | |
499 | </ng-container> | |
500 | ||
501 | <ng-container ngProjectAs="extra"> | |
502 | <div [ngClass]="{ 'disabled-checkbox-extra': !isSearchIndexEnabled() }"> | |
503 | <label i18n for="searchIndexUrl">Search index URL</label> | |
504 | <input | |
505 | type="text" id="searchIndexUrl" class="form-control" | |
506 | formControlName="url" [ngClass]="{ 'input-error': formErrors['search.searchIndex.url'] }" | |
507 | > | |
508 | <div *ngIf="formErrors.search.searchIndex.url" class="form-error">{{ formErrors.search.searchIndex.url }}</div> | |
509 | </div> | |
510 | ||
511 | <div class="mt-3"> | |
512 | <my-peertube-checkbox [ngClass]="{ 'disabled-checkbox-extra': !isSearchIndexEnabled() }" | |
513 | inputName="searchIndexDisableLocalSearch" formControlName="disableLocalSearch" | |
514 | i18n-labelText labelText="Disable local search in search bar" | |
515 | ></my-peertube-checkbox> | |
516 | </div> | |
517 | ||
518 | <div class="mt-3"> | |
519 | <my-peertube-checkbox [ngClass]="{ 'disabled-checkbox-extra': !isSearchIndexEnabled() }" | |
520 | inputName="searchIndexIsDefaultSearch" formControlName="isDefaultSearch" | |
521 | i18n-labelText labelText="Search bar uses the global search index by default" | |
522 | > | |
523 | <ng-container ngProjectAs="description"> | |
524 | <span i18n>Otherwise the local search stays used by default</span> | |
525 | </ng-container> | |
526 | </my-peertube-checkbox> | |
527 | </div> | |
528 | ||
529 | </ng-container> | |
530 | </my-peertube-checkbox> | |
531 | </div> | |
532 | ||
533 | </ng-container> | |
534 | ||
535 | </ng-container> | |
536 | ||
537 | </div> | |
538 | </div> | |
539 | ||
540 | <div class="form-row mt-4"> <!-- federation grid --> | |
541 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
542 | <div i18n class="inner-form-title">FEDERATION</div> | |
543 | <div i18n class="inner-form-description"> | |
544 | Manage <a routerLink="/admin/follows">relations</a> with other instances. | |
545 | </div> | |
546 | </div> | |
547 | ||
548 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> | |
549 | ||
550 | <ng-container formGroupName="followers"> | |
551 | <ng-container formGroupName="instance"> | |
552 | ||
553 | <div class="form-group"> | |
554 | <my-peertube-checkbox | |
555 | inputName="followersInstanceEnabled" formControlName="enabled" | |
556 | i18n-labelText labelText="Other instances can follow yours" | |
557 | ></my-peertube-checkbox> | |
558 | </div> | |
559 | ||
560 | <div class="form-group"> | |
561 | <my-peertube-checkbox | |
562 | inputName="followersInstanceManualApproval" formControlName="manualApproval" | |
563 | i18n-labelText labelText="Manually approve new instance followers" | |
564 | ></my-peertube-checkbox> | |
565 | </div> | |
566 | </ng-container> | |
567 | </ng-container> | |
568 | ||
569 | <ng-container formGroupName="followings"> | |
570 | <ng-container formGroupName="instance"> | |
571 | ||
572 | <ng-container formGroupName="autoFollowBack"> | |
573 | <div class="form-group"> | |
574 | <my-peertube-checkbox | |
575 | inputName="followingsInstanceAutoFollowBackEnabled" formControlName="enabled" | |
576 | i18n-labelText labelText="Automatically follow back instances" | |
577 | > | |
578 | <ng-container ngProjectAs="description"> | |
579 | <span i18n>⚠️ This functionality requires a lot of attention and extra moderation.</span> | |
580 | </ng-container> | |
581 | </my-peertube-checkbox> | |
582 | </div> | |
583 | </ng-container> | |
584 | ||
585 | <ng-container formGroupName="autoFollowIndex"> | |
586 | <div class="form-group"> | |
587 | <my-peertube-checkbox | |
588 | inputName="followingsInstanceAutoFollowIndexEnabled" formControlName="enabled" | |
589 | i18n-labelText labelText="Automatically follow instances of a public index" | |
590 | > | |
591 | <ng-container ngProjectAs="description"> | |
592 | <p i18n>⚠️ This functionality requires a lot of attention and extra moderation.</p> | |
593 | ||
594 | <span i18n> | |
595 | You should only follow moderated indexes in production, or <a href="https://framagit.org/framasoft/peertube/instances-peertube#peertube-auto-follow">host your own</a>. | |
596 | </span> | |
597 | </ng-container> | |
598 | ||
599 | <ng-container ngProjectAs="extra"> | |
600 | <div [ngClass]="{ 'disabled-checkbox-extra': !isAutoFollowIndexEnabled() }"> | |
601 | <label i18n for="followingsInstanceAutoFollowIndexUrl">Index URL</label> | |
602 | <input | |
603 | type="text" id="followingsInstanceAutoFollowIndexUrl" class="form-control" | |
604 | formControlName="indexUrl" [ngClass]="{ 'input-error': formErrors['followings.instance.autoFollowIndex.indexUrl'] }" | |
605 | > | |
606 | <div *ngIf="formErrors.followings.instance.autoFollowIndex.indexUrl" class="form-error">{{ formErrors.followings.instance.autoFollowIndex.indexUrl }}</div> | |
607 | </div> | |
608 | </ng-container> | |
609 | </my-peertube-checkbox> | |
610 | </div> | |
611 | ||
612 | </ng-container> | |
613 | </ng-container> | |
614 | </ng-container> | |
615 | ||
616 | </div> | |
617 | </div> | |
618 | ||
619 | <div class="form-row mt-4"> <!-- administrators grid --> | |
620 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
621 | <div i18n class="inner-form-title">ADMINISTRATORS</div> | |
622 | </div> | |
623 | ||
624 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> | |
625 | ||
626 | <div class="form-group" formGroupName="admin"> | |
627 | <label i18n for="adminEmail">Admin email</label> | |
628 | <input | |
629 | type="text" id="adminEmail" class="form-control" | |
630 | formControlName="email" [ngClass]="{ 'input-error': formErrors['admin.email'] }" | |
631 | > | |
632 | <div *ngIf="formErrors.admin.email" class="form-error">{{ formErrors.admin.email }}</div> | |
633 | </div> | |
634 | ||
635 | <div class="form-group" formGroupName="contactForm"> | |
636 | <my-peertube-checkbox | |
637 | inputName="enableContactForm" formControlName="enabled" | |
638 | i18n-labelText labelText="Enable contact form" | |
639 | ></my-peertube-checkbox> | |
640 | </div> | |
641 | ||
642 | </div> | |
643 | </div> | |
644 | ||
645 | </ng-template> | |
646 | </ng-container> | |
647 | ||
648 | <ng-container ngbNavItem="services"> | |
649 | <a ngbNavLink i18n>Services</a> | |
650 | ||
651 | <ng-template ngbNavContent> | |
652 | ||
653 | <div class="form-row mt-5"> <!-- twitter grid --> | |
654 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
655 | <div i18n class="inner-form-title">TWITTER</div> | |
656 | <div i18n class="inner-form-description"> | |
657 | Optional. If any, provide the Twitter account representing your instance to improve link previews. | |
658 | </div> | |
659 | </div> | |
660 | ||
661 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> | |
662 | ||
663 | <ng-container formGroupName="services"> | |
664 | <ng-container formGroupName="twitter"> | |
665 | ||
666 | <div class="form-group"> | |
667 | <label i18n for="signupLimit">Your Twitter username</label> | |
668 | ||
669 | <input | |
670 | type="text" id="servicesTwitterUsername" class="form-control" | |
671 | formControlName="username" [ngClass]="{ 'input-error': formErrors['services.twitter.username'] }" | |
672 | > | |
673 | <div *ngIf="formErrors.services.twitter.username" class="form-error">{{ formErrors.services.twitter.username }}</div> | |
674 | </div> | |
675 | ||
676 | <div class="form-group"> | |
677 | <my-peertube-checkbox inputName="servicesTwitterWhitelisted" formControlName="whitelisted"> | |
678 | <ng-template ptTemplate="label"> | |
679 | <ng-container i18n>Instance allowed by Twitter</ng-container> | |
680 | </ng-template> | |
681 | ||
682 | <ng-template ptTemplate="help"> | |
683 | <ng-container i18n> | |
684 | If your instance is explicitly allowed by Twitter, a video player will be embedded in the Twitter feed on PeerTube video share.<br /> | |
685 | If the instance is not, we use an image link card that will redirect on your PeerTube instance.<br /><br /> | |
686 | Check this checkbox, save the configuration and test with a video URL of your instance (https://example.com/videos/watch/blabla) on | |
687 | <a target='_blank' rel='noopener noreferrer' href='https://cards-dev.twitter.com/validator'>https://cards-dev.twitter.com/validator</a> | |
688 | to see if you instance is allowed. | |
689 | </ng-container> | |
690 | </ng-template> | |
691 | </my-peertube-checkbox> | |
692 | </div> | |
693 | ||
694 | </ng-container> | |
695 | </ng-container> | |
696 | ||
697 | </div> | |
698 | </div> | |
699 | </ng-template> | |
700 | </ng-container> | |
701 | ||
702 | <div ngbNavItem="live"> | |
703 | <a ngbNavLink i18n>Live streaming</a> | |
704 | ||
705 | <ng-template ngbNavContent> | |
706 | ||
707 | <div class="form-row mt-5"> | |
708 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
709 | <div i18n class="inner-form-title">LIVE</div> | |
710 | <div i18n class="inner-form-description"> | |
711 | Add ability for your users to do live streaming on your instance. | |
712 | </div> | |
713 | </div> | |
714 | ||
715 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> | |
716 | ||
717 | <ng-container formGroupName="live"> | |
718 | ||
719 | <div class="form-group"> | |
720 | <my-peertube-checkbox inputName="liveEnabled" formControlName="enabled"> | |
721 | <ng-template ptTemplate="label"> | |
722 | <ng-container i18n>Allow live streaming</ng-container> | |
723 | </ng-template> | |
724 | ||
725 | <ng-container ngProjectAs="description" i18n> | |
726 | ⚠️ Enabling live streaming requires trust in your users and extra moderation work | |
727 | </ng-container> | |
728 | ||
729 | <ng-container ngProjectAs="extra"> | |
730 | ||
731 | <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isLiveEnabled() }"> | |
732 | <my-peertube-checkbox | |
733 | inputName="liveAllowReplay" formControlName="allowReplay" | |
734 | i18n-labelText labelText="Allow your users to automatically publish a replay of their live" | |
735 | > | |
736 | <ng-container ngProjectAs="description" i18n> | |
737 | If the user quota is reached, PeerTube will automatically terminate the live streaming | |
738 | </ng-container> | |
739 | </my-peertube-checkbox> | |
740 | </div> | |
741 | ||
742 | <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isLiveEnabled() }"> | |
743 | <label i18n for="liveMaxDuration">Max live duration</label> | |
744 | <div class="peertube-select-container"> | |
745 | <select id="liveMaxDuration" formControlName="maxDuration" class="form-control"> | |
746 | <option *ngFor="let liveMaxDurationOption of liveMaxDurationOptions" [value]="liveMaxDurationOption.value"> | |
747 | {{ liveMaxDurationOption.label }} | |
748 | </option> | |
749 | </select> | |
750 | </div> | |
751 | </div> | |
752 | ||
753 | <ng-container formGroupName="transcoding"> | |
754 | ||
755 | <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isLiveEnabled() }"> | |
756 | <my-peertube-checkbox | |
757 | inputName="liveTranscodingEnabled" formControlName="enabled" | |
758 | i18n-labelText labelText="Enable live transcoding" | |
759 | > | |
760 | <ng-container ngProjectAs="description" i18n> | |
761 | Requires a lot of CPU! | |
762 | </ng-container> | |
763 | </my-peertube-checkbox> | |
764 | </div> | |
765 | ||
766 | <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isLiveEnabled() || !isLiveTranscodingEnabled() }"> | |
767 | <label i18n for="liveTranscodingThreads">Live transcoding threads</label> | |
768 | <div class="peertube-select-container"> | |
769 | <select id="liveTranscodingThreads" formControlName="threads" class="form-control"> | |
770 | <option *ngFor="let transcodingThreadOption of transcodingThreadOptions" [value]="transcodingThreadOption.value"> | |
771 | {{ transcodingThreadOption.label }} | |
772 | </option> | |
773 | </select> | |
774 | </div> | |
775 | <div *ngIf="formErrors.live.transcoding.threads" class="form-error">{{ formErrors.live.transcoding.threads }}</div> | |
776 | </div> | |
777 | ||
778 | <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isLiveEnabled() || !isLiveTranscodingEnabled() }"> | |
779 | <label i18n for="liveTranscodingThreads">Live resolutions to generate</label> | |
780 | ||
781 | <div class="ml-2 mt-2 d-flex flex-column"> | |
782 | <ng-container formGroupName="resolutions"> | |
783 | <div class="form-group" *ngFor="let resolution of liveResolutions"> | |
784 | <my-peertube-checkbox | |
785 | [inputName]="getResolutionKey(resolution.id)" [formControlName]="resolution.id" | |
786 | labelText="{{resolution.label}}" | |
787 | > | |
788 | <ng-template *ngIf="resolution.description" ptTemplate="help"> | |
789 | <div [innerHTML]="resolution.description"></div> | |
790 | </ng-template> | |
791 | </my-peertube-checkbox> | |
792 | </div> | |
793 | </ng-container> | |
794 | </div> | |
795 | </div> | |
796 | </ng-container> | |
797 | </ng-container> | |
798 | </my-peertube-checkbox> | |
799 | </div> | |
800 | </ng-container> | |
801 | </div> | |
802 | </div> | |
803 | ||
804 | </ng-template> | |
805 | </div> | |
806 | ||
807 | <ng-container ngbNavItem="advanced-configuration"> | |
808 | <a ngbNavLink i18n>Advanced configuration</a> | |
809 | ||
810 | <ng-template ngbNavContent> | |
811 | ||
812 | <div class="form-row mt-5"> <!-- transcoding grid --> | |
813 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
814 | <div i18n class="inner-form-title">TRANSCODING</div> | |
815 | <div i18n class="inner-form-description"> | |
816 | Process uploaded videos so that they are in a streamable form that any device can play. Though costly in | |
817 | resources, this is a critical part of PeerTube, so tread carefully. | |
818 | </div> | |
819 | </div> | |
820 | ||
821 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> | |
822 | ||
823 | <ng-container formGroupName="transcoding"> | |
824 | ||
825 | <div class="form-group"> | |
826 | <my-peertube-checkbox inputName="transcodingEnabled" formControlName="enabled"> | |
827 | <ng-template ptTemplate="label"> | |
828 | <ng-container i18n>Transcoding enabled</ng-container> | |
829 | </ng-template> | |
830 | ||
831 | <ng-template ptTemplate="help"> | |
832 | <ng-container i18n>If you disable transcoding, many videos from your users will not work!</ng-container> | |
833 | </ng-template> | |
834 | ||
835 | <ng-container ngProjectAs="extra"> | |
836 | ||
837 | <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isTranscodingEnabled() }"> | |
838 | <my-peertube-checkbox | |
839 | inputName="transcodingAllowAdditionalExtensions" formControlName="allowAdditionalExtensions" | |
840 | i18n-labelText labelText="Allow additional extensions" | |
841 | > | |
842 | <ng-container ngProjectAs="description"> | |
843 | <span i18n>Allows users to upload .mkv, .mov, .avi, .wmv, .flv, .f4v, .3g2, .3gp, .mts, m2ts, .mxf, .nut videos.</span> | |
844 | </ng-container> | |
845 | </my-peertube-checkbox> | |
846 | </div> | |
847 | ||
848 | <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isTranscodingEnabled() }"> | |
849 | <my-peertube-checkbox | |
850 | inputName="transcodingAllowAudioFiles" formControlName="allowAudioFiles" | |
851 | i18n-labelText labelText="Allow audio files upload" | |
852 | > | |
853 | <ng-container ngProjectAs="description"> | |
854 | <span i18n>Allows users to upload audio files that will be merged with the preview file on upload.</span> | |
855 | </ng-container> | |
856 | </my-peertube-checkbox> | |
857 | </div> | |
858 | ||
859 | <ng-container formGroupName="webtorrent"> | |
860 | <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isTranscodingEnabled() }"> | |
861 | <my-peertube-checkbox | |
862 | inputName="transcodingWebTorrentEnabled" formControlName="enabled" | |
863 | i18n-labelText labelText="WebTorrent support enabled" | |
864 | > | |
865 | <ng-template ptTemplate="help"> | |
866 | <ng-container i18n> | |
867 | <strong>Experimental, we suggest you to not disable webtorrent support for now</strong> | |
868 | ||
869 | <p>If you also enabled HLS support, it will multiply videos storage by 2</p> | |
870 | ||
871 | <br /> | |
872 | ||
873 | <strong>If disabled, breaks federation with PeerTube instances < 2.1</strong> | |
874 | </ng-container> | |
875 | </ng-template> | |
876 | </my-peertube-checkbox> | |
877 | </div> | |
878 | </ng-container> | |
879 | ||
880 | <ng-container formGroupName="hls"> | |
881 | <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isTranscodingEnabled() }"> | |
882 | <my-peertube-checkbox | |
883 | inputName="transcodingHlsEnabled" formControlName="enabled" | |
884 | i18n-labelText labelText="HLS with P2P support enabled" | |
885 | > | |
886 | <ng-template ptTemplate="help"> | |
887 | <ng-container i18n> | |
888 | <strong>Requires ffmpeg >= 4.1</strong> | |
889 | ||
890 | <p>Generate HLS playlists and fragmented MP4 files resulting in a better playback than with the current default player:</p> | |
891 | <ul> | |
892 | <li>Resolution change is smoother</li> | |
893 | <li>Faster playback in particular with long videos</li> | |
894 | <li>More stable playback (less bugs/infinite loading)</li> | |
895 | </ul> | |
896 | ||
897 | <p>If you also enabled WebTorrent support, it will multiply videos storage by 2</p> | |
898 | </ng-container> | |
899 | </ng-template> | |
900 | </my-peertube-checkbox> | |
901 | </div> | |
902 | </ng-container> | |
903 | ||
904 | </ng-container> | |
905 | </my-peertube-checkbox> | |
906 | </div> | |
907 | ||
908 | <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isTranscodingEnabled() }"> | |
909 | <label i18n for="transcodingThreads">Transcoding threads</label> | |
910 | <div class="peertube-select-container"> | |
911 | <select id="transcodingThreads" formControlName="threads" class="form-control"> | |
912 | <option *ngFor="let transcodingThreadOption of transcodingThreadOptions" [value]="transcodingThreadOption.value"> | |
913 | {{ transcodingThreadOption.label }} | |
914 | </option> | |
915 | </select> | |
916 | </div> | |
917 | <div *ngIf="formErrors.transcoding.threads" class="form-error">{{ formErrors.transcoding.threads }}</div> | |
918 | </div> | |
919 | ||
920 | <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isTranscodingEnabled() }"> | |
921 | ||
922 | <label i18n>Resolutions to generate</label> | |
923 | ||
924 | <div class="ml-2 mt-2 d-flex flex-column"> | |
925 | <ng-container formGroupName="resolutions"> | |
926 | <div class="form-group" *ngFor="let resolution of resolutions"> | |
927 | <my-peertube-checkbox | |
928 | [inputName]="getResolutionKey(resolution.id)" [formControlName]="resolution.id" | |
929 | labelText="{{resolution.label}}" | |
930 | > | |
931 | <ng-template *ngIf="resolution.description" ptTemplate="help"> | |
932 | <div [innerHTML]="resolution.description"></div> | |
933 | </ng-template> | |
934 | </my-peertube-checkbox> | |
935 | </div> | |
936 | </ng-container> | |
937 | </div> | |
938 | ||
939 | </div> | |
940 | ||
941 | </ng-container> | |
942 | ||
943 | </div> | |
944 | </div> | |
945 | ||
946 | <div class="form-row mt-4"> <!-- cache grid --> | |
947 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
948 | <div i18n class="inner-form-title">CACHE</div> | |
949 | <div i18n class="inner-form-description"> | |
950 | Some files are not federated, and fetched when necessary. Define their caching policies. | |
951 | </div> | |
952 | </div> | |
953 | ||
954 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> | |
955 | ||
956 | <ng-container formGroupName="cache"> | |
957 | <div class="form-group" formGroupName="previews"> | |
958 | <label i18n for="cachePreviewsSize">Number of previews to keep in cache</label> | |
959 | <input | |
960 | type="number" min="0" id="cachePreviewsSize" class="form-control" | |
961 | formControlName="size" [ngClass]="{ 'input-error': formErrors['cache.previews.size'] }" | |
962 | > | |
963 | <div *ngIf="formErrors.cache.previews.size" class="form-error">{{ formErrors.cache.previews.size }}</div> | |
964 | </div> | |
965 | ||
966 | <div class="form-group" formGroupName="captions"> | |
967 | <label i18n for="cacheCaptionsSize">Number of video captions to keep in cache</label> | |
968 | <input | |
969 | type="number" min="0" id="cacheCaptionsSize" class="form-control" | |
970 | formControlName="size" [ngClass]="{ 'input-error': formErrors['cache.captions.size'] }" | |
971 | > | |
972 | <div *ngIf="formErrors.cache.captions.size" class="form-error">{{ formErrors.cache.captions.size }}</div> | |
973 | </div> | |
974 | </ng-container> | |
975 | ||
976 | </div> | |
977 | </div> | |
978 | ||
979 | <div class="form-row mt-4"> <!-- cache grid --> | |
980 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
981 | <div class="anchor" id="customizations"></div> <!-- customizations anchor --> | |
982 | <div i18n class="inner-form-title">CUSTOMIZATIONS</div> | |
983 | <div i18n class="inner-form-description"> | |
984 | Slight modifications to your PeerTube instance for when creating a plugin or theme is overkill. | |
985 | </div> | |
986 | </div> | |
987 | ||
988 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> | |
989 | ||
990 | <ng-container formGroupName="instance"> | |
991 | <ng-container formGroupName="customizations"> | |
992 | <div class="form-group"> | |
993 | <label i18n for="customizationJavascript">JavaScript</label> | |
994 | <my-help> | |
995 | <ng-template ptTemplate="customHtml"> | |
996 | <ng-container i18n> | |
997 | Write JavaScript code directly.<br />Example: <pre>console.log('my instance is amazing');</pre> | |
998 | </ng-container> | |
999 | </ng-template> | |
1000 | </my-help> | |
1001 | ||
1002 | <textarea | |
1003 | id="customizationJavascript" formControlName="javascript" class="form-control" | |
1004 | [ngClass]="{ 'input-error': formErrors['instance.customizations.javascript'] }" | |
1005 | ></textarea> | |
1006 | ||
1007 | <div *ngIf="formErrors.instance.customizations.javascript" class="form-error">{{ formErrors.instance.customizations.javascript }}</div> | |
1008 | </div> | |
1009 | ||
1010 | <div class="form-group"> | |
1011 | <label for="customizationCSS">CSS</label> | |
1012 | ||
1013 | <my-help> | |
1014 | <ng-template ptTemplate="customHtml"> | |
1015 | <ng-container i18n> | |
1016 | Write CSS code directly. Example:<br /><br /> | |
1017 | <pre> | |
1018 | #custom-css {{ '{' }} | |
1019 | color: red; | |
1020 | {{ '}' }} | |
1021 | </pre> | |
1022 | Prepend with <em>#custom-css</em> to override styles. Example:<br /><br /> | |
1023 | <pre> | |
1024 | #custom-css .logged-in-email {{ '{' }} | |
1025 | color: red; | |
1026 | {{ '}' }} | |
1027 | </pre> | |
1028 | </ng-container> | |
1029 | </ng-template> | |
1030 | </my-help> | |
1031 | ||
1032 | <textarea | |
1033 | id="customizationCSS" formControlName="css" class="form-control" | |
1034 | [ngClass]="{ 'input-error': formErrors['instance.customizations.css'] }" | |
1035 | ></textarea> | |
1036 | <div *ngIf="formErrors.instance.customizations.css" class="form-error">{{ formErrors.instance.customizations.css }}</div> | |
1037 | </div> | |
1038 | </ng-container> | |
1039 | </ng-container> | |
1040 | ||
1041 | </div> | |
1042 | </div> | |
1043 | ||
1044 | </ng-template> | |
1045 | </ng-container> | |
1046 | </div> | |
1047 | ||
1048 | <div [ngbNavOutlet]="nav"></div> | |
1049 | ||
1050 | <div class="form-row mt-4"> <!-- submit placement block --> | |
1051 | <div class="col-md-7 col-xl-5"></div> | |
1052 | <div class="col-md-5 col-xl-5"> | |
1053 | <span class="form-error submit-error" i18n *ngIf="!form.valid"> | |
1054 | It seems like the configuration is invalid. Please search for potential errors in the different tabs. | |
1055 | </span> | |
1056 | ||
1057 | <span class="form-error submit-error" i18n *ngIf="!hasLiveAllowReplayConsistentOptions()"> | |
1058 | You cannot allow live replay if you don't enable transcoding. | |
1059 | </span> | |
1060 | ||
1061 | <input (click)="formValidated()" type="submit" i18n-value value="Update configuration" [disabled]="!form.valid || !hasConsistentOptions()"> | |
1062 | </div> | |
1063 | </div> | |
1064 | </form> |