]>
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 | ||
355 | <div class="alert alert-info alert-signup" *ngIf="signupAlertMessage">{{ signupAlertMessage }}</div> | |
356 | </ng-container> | |
357 | <ng-container ngProjectAs="extra"> | |
358 | <my-peertube-checkbox [ngClass]="{ 'disabled-checkbox-extra': !isSignupEnabled() }" | |
359 | inputName="signupRequiresEmailVerification" formControlName="requiresEmailVerification" | |
360 | i18n-labelText labelText="Signup requires email verification" | |
361 | ></my-peertube-checkbox> | |
362 | ||
363 | <div [ngClass]="{ 'disabled-checkbox-extra': !isSignupEnabled() }" class="mt-3"> | |
364 | <label i18n for="signupLimit">Signup limit</label> | |
365 | <input | |
366 | type="number" min="-1" id="signupLimit" class="form-control" | |
367 | formControlName="limit" [ngClass]="{ 'input-error': formErrors['signup.limit'] }" | |
368 | > | |
369 | <div *ngIf="formErrors.signup.limit" class="form-error">{{ formErrors.signup.limit }}</div> | |
370 | <small *ngIf="form.value['signup']['limit'] === -1" class="text-muted">Signup won't be limited to a fixed number of users.</small> | |
371 | </div> | |
372 | </ng-container> | |
373 | </my-peertube-checkbox> | |
374 | </div> | |
375 | </ng-container> | |
376 | ||
377 | <ng-container formGroupName="user"> | |
378 | <div class="form-group"> | |
379 | <label i18n for="userVideoQuota">Default video quota per user</label> | |
380 | <div class="peertube-select-container"> | |
381 | <select id="userVideoQuota" formControlName="videoQuota" class="form-control"> | |
382 | <option *ngFor="let videoQuotaOption of videoQuotaOptions" [value]="videoQuotaOption.value" [disabled]="videoQuotaOption.disabled"> | |
383 | {{ videoQuotaOption.label }} | |
384 | </option> | |
385 | </select> | |
386 | </div> | |
387 | <div *ngIf="formErrors.user.videoQuota" class="form-error">{{ formErrors.user.videoQuota }}</div> | |
388 | </div> | |
389 | ||
390 | <div class="form-group"> | |
391 | <label i18n for="userVideoQuotaDaily">Default daily upload limit per user</label> | |
392 | <div class="peertube-select-container"> | |
393 | <select id="userVideoQuotaDaily" formControlName="videoQuotaDaily" class="form-control"> | |
394 | <option *ngFor="let videoQuotaDailyOption of videoQuotaDailyOptions" [value]="videoQuotaDailyOption.value" [disabled]="videoQuotaDailyOption.disabled"> | |
395 | {{ videoQuotaDailyOption.label }} | |
396 | </option> | |
397 | </select> | |
398 | </div> | |
399 | <div *ngIf="formErrors.user.videoQuotaDaily" class="form-error">{{ formErrors.user.videoQuotaDaily }}</div> | |
400 | </div> | |
401 | </ng-container> | |
402 | ||
403 | </div> | |
404 | </div> | |
405 | ||
406 | <div class="form-row mt-4"> <!-- videos grid --> | |
407 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
408 | <div i18n class="inner-form-title">VIDEOS</div> | |
409 | </div> | |
410 | ||
411 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> | |
412 | ||
413 | <ng-container formGroupName="import"> | |
414 | <ng-container formGroupName="videos"> | |
415 | ||
416 | <div class="form-group" formGroupName="http"> | |
417 | <my-peertube-checkbox | |
418 | inputName="importVideosHttpEnabled" formControlName="enabled" | |
419 | i18n-labelText labelText="Allow import with HTTP URL (i.e. YouTube)" | |
420 | ></my-peertube-checkbox> | |
421 | </div> | |
422 | ||
423 | <div class="form-group" formGroupName="torrent"> | |
424 | <my-peertube-checkbox | |
425 | inputName="importVideosTorrentEnabled" formControlName="enabled" | |
426 | i18n-labelText labelText="Allow import with a torrent file or a magnet URI" | |
427 | ></my-peertube-checkbox> | |
428 | </div> | |
429 | ||
430 | </ng-container> | |
431 | </ng-container> | |
432 | ||
433 | <ng-container formGroupName="autoBlacklist"> | |
434 | <ng-container formGroupName="videos"> | |
435 | <ng-container formGroupName="ofUsers"> | |
436 | ||
437 | <div class="form-group"> | |
438 | <my-peertube-checkbox | |
439 | inputName="autoBlacklistVideosOfUsersEnabled" formControlName="enabled" | |
440 | i18n-labelText labelText="Block new videos automatically" | |
441 | > | |
442 | <ng-container ngProjectAs="description"> | |
443 | <span i18n>Unless a user is marked as trusted, their videos will stay private until a moderator reviews them.</span> | |
444 | </ng-container> | |
445 | </my-peertube-checkbox> | |
446 | </div> | |
447 | ||
448 | </ng-container> | |
449 | </ng-container> | |
450 | </ng-container> | |
451 | ||
452 | </div> | |
453 | </div> | |
454 | ||
455 | <div class="form-row mt-4"> <!-- search grid --> | |
456 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
457 | <div i18n class="inner-form-title">SEARCH</div> | |
458 | </div> | |
459 | ||
460 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> | |
461 | ||
462 | <ng-container formGroupName="search"> | |
463 | <ng-container formGroupName="remoteUri"> | |
464 | ||
465 | <div class="form-group"> | |
466 | <my-peertube-checkbox | |
467 | inputName="searchRemoteUriUsers" formControlName="users" | |
468 | i18n-labelText labelText="Allow users to do remote URI/handle search" | |
469 | > | |
470 | <ng-container ngProjectAs="description"> | |
471 | <span i18n>Allow <strong>your users</strong> to look up remote videos/actors that may not be federated with your instance</span> | |
472 | </ng-container> | |
473 | </my-peertube-checkbox> | |
474 | </div> | |
475 | ||
476 | <div class="form-group"> | |
477 | <my-peertube-checkbox | |
478 | inputName="searchRemoteUriAnonymous" formControlName="anonymous" | |
479 | i18n-labelText labelText="Allow anonymous to do remote URI/handle search" | |
480 | > | |
481 | <ng-container ngProjectAs="description"> | |
482 | <span i18n>Allow <strong>anonymous users</strong> to look up remote videos/actors that may not be federated with your instance</span> | |
483 | </ng-container> | |
484 | </my-peertube-checkbox> | |
485 | </div> | |
486 | ||
487 | </ng-container> | |
488 | ||
489 | <ng-container formGroupName="searchIndex"> | |
490 | <div class="form-group"> | |
491 | <my-peertube-checkbox | |
492 | inputName="searchIndexEnabled" formControlName="enabled" | |
493 | i18n-labelText labelText="Enable global search" | |
494 | > | |
495 | <ng-container ngProjectAs="description"> | |
496 | <p i18n>⚠️ This functionality depends heavily on the moderation of instances followed by the search index you select.</p> | |
497 | ||
498 | <span i18n> | |
499 | You should only use moderated search indexes in production, or <a href="https://framagit.org/framasoft/peertube/search-index">host your own</a>. | |
500 | </span> | |
501 | </ng-container> | |
502 | ||
503 | <ng-container ngProjectAs="extra"> | |
504 | <div [ngClass]="{ 'disabled-checkbox-extra': !isSearchIndexEnabled() }"> | |
505 | <label i18n for="searchIndexUrl">Search index URL</label> | |
506 | <input | |
507 | type="text" id="searchIndexUrl" class="form-control" | |
508 | formControlName="url" [ngClass]="{ 'input-error': formErrors['search.searchIndex.url'] }" | |
509 | > | |
510 | <div *ngIf="formErrors.search.searchIndex.url" class="form-error">{{ formErrors.search.searchIndex.url }}</div> | |
511 | </div> | |
512 | ||
513 | <div class="mt-3"> | |
514 | <my-peertube-checkbox [ngClass]="{ 'disabled-checkbox-extra': !isSearchIndexEnabled() }" | |
515 | inputName="searchIndexDisableLocalSearch" formControlName="disableLocalSearch" | |
516 | i18n-labelText labelText="Disable local search in search bar" | |
517 | ></my-peertube-checkbox> | |
518 | </div> | |
519 | ||
520 | <div class="mt-3"> | |
521 | <my-peertube-checkbox [ngClass]="{ 'disabled-checkbox-extra': !isSearchIndexEnabled() }" | |
522 | inputName="searchIndexIsDefaultSearch" formControlName="isDefaultSearch" | |
523 | i18n-labelText labelText="Search bar uses the global search index by default" | |
524 | > | |
525 | <ng-container ngProjectAs="description"> | |
526 | <span i18n>Otherwise the local search stays used by default</span> | |
527 | </ng-container> | |
528 | </my-peertube-checkbox> | |
529 | </div> | |
530 | ||
531 | </ng-container> | |
532 | </my-peertube-checkbox> | |
533 | </div> | |
534 | ||
535 | </ng-container> | |
536 | ||
537 | </ng-container> | |
538 | ||
539 | </div> | |
540 | </div> | |
541 | ||
542 | <div class="form-row mt-4"> <!-- federation grid --> | |
543 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
544 | <div i18n class="inner-form-title">FEDERATION</div> | |
545 | <div i18n class="inner-form-description"> | |
546 | Manage <a routerLink="/admin/follows">relations</a> with other instances. | |
547 | </div> | |
548 | </div> | |
549 | ||
550 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> | |
551 | ||
552 | <ng-container formGroupName="followers"> | |
553 | <ng-container formGroupName="instance"> | |
554 | ||
555 | <div class="form-group"> | |
556 | <my-peertube-checkbox | |
557 | inputName="followersInstanceEnabled" formControlName="enabled" | |
558 | i18n-labelText labelText="Other instances can follow yours" | |
559 | ></my-peertube-checkbox> | |
560 | </div> | |
561 | ||
562 | <div class="form-group"> | |
563 | <my-peertube-checkbox | |
564 | inputName="followersInstanceManualApproval" formControlName="manualApproval" | |
565 | i18n-labelText labelText="Manually approve new instance followers" | |
566 | ></my-peertube-checkbox> | |
567 | </div> | |
568 | </ng-container> | |
569 | </ng-container> | |
570 | ||
571 | <ng-container formGroupName="followings"> | |
572 | <ng-container formGroupName="instance"> | |
573 | ||
574 | <ng-container formGroupName="autoFollowBack"> | |
575 | <div class="form-group"> | |
576 | <my-peertube-checkbox | |
577 | inputName="followingsInstanceAutoFollowBackEnabled" formControlName="enabled" | |
578 | i18n-labelText labelText="Automatically follow back instances" | |
579 | > | |
580 | <ng-container ngProjectAs="description"> | |
581 | <span i18n>⚠️ This functionality requires a lot of attention and extra moderation.</span> | |
582 | </ng-container> | |
583 | </my-peertube-checkbox> | |
584 | </div> | |
585 | </ng-container> | |
586 | ||
587 | <ng-container formGroupName="autoFollowIndex"> | |
588 | <div class="form-group"> | |
589 | <my-peertube-checkbox | |
590 | inputName="followingsInstanceAutoFollowIndexEnabled" formControlName="enabled" | |
591 | i18n-labelText labelText="Automatically follow instances of a public index" | |
592 | > | |
593 | <ng-container ngProjectAs="description"> | |
594 | <p i18n>⚠️ This functionality requires a lot of attention and extra moderation.</p> | |
595 | ||
596 | <span i18n> | |
597 | 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>. | |
598 | </span> | |
599 | </ng-container> | |
600 | ||
601 | <ng-container ngProjectAs="extra"> | |
602 | <div [ngClass]="{ 'disabled-checkbox-extra': !isAutoFollowIndexEnabled() }"> | |
603 | <label i18n for="followingsInstanceAutoFollowIndexUrl">Index URL</label> | |
604 | <input | |
605 | type="text" id="followingsInstanceAutoFollowIndexUrl" class="form-control" | |
606 | formControlName="indexUrl" [ngClass]="{ 'input-error': formErrors['followings.instance.autoFollowIndex.indexUrl'] }" | |
607 | > | |
608 | <div *ngIf="formErrors.followings.instance.autoFollowIndex.indexUrl" class="form-error">{{ formErrors.followings.instance.autoFollowIndex.indexUrl }}</div> | |
609 | </div> | |
610 | </ng-container> | |
611 | </my-peertube-checkbox> | |
612 | </div> | |
613 | ||
614 | </ng-container> | |
615 | </ng-container> | |
616 | </ng-container> | |
617 | ||
618 | </div> | |
619 | </div> | |
620 | ||
621 | <div class="form-row mt-4"> <!-- administrators grid --> | |
622 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
623 | <div i18n class="inner-form-title">ADMINISTRATORS</div> | |
624 | </div> | |
625 | ||
626 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> | |
627 | ||
628 | <div class="form-group" formGroupName="admin"> | |
629 | <label i18n for="adminEmail">Admin email</label> | |
630 | <input | |
631 | type="text" id="adminEmail" class="form-control" | |
632 | formControlName="email" [ngClass]="{ 'input-error': formErrors['admin.email'] }" | |
633 | > | |
634 | <div *ngIf="formErrors.admin.email" class="form-error">{{ formErrors.admin.email }}</div> | |
635 | </div> | |
636 | ||
637 | <div class="form-group" formGroupName="contactForm"> | |
638 | <my-peertube-checkbox | |
639 | inputName="enableContactForm" formControlName="enabled" | |
640 | i18n-labelText labelText="Enable contact form" | |
641 | ></my-peertube-checkbox> | |
642 | </div> | |
643 | ||
644 | </div> | |
645 | </div> | |
646 | ||
647 | </ng-template> | |
648 | </ng-container> | |
649 | ||
650 | <ng-container ngbNavItem="services"> | |
651 | <a ngbNavLink i18n>Services</a> | |
652 | ||
653 | <ng-template ngbNavContent> | |
654 | ||
655 | <div class="form-row mt-5"> <!-- twitter grid --> | |
656 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
657 | <div i18n class="inner-form-title">TWITTER</div> | |
658 | <div i18n class="inner-form-description"> | |
659 | Optional. If any, provide the Twitter account representing your instance to improve link previews. | |
660 | </div> | |
661 | </div> | |
662 | ||
663 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> | |
664 | ||
665 | <ng-container formGroupName="services"> | |
666 | <ng-container formGroupName="twitter"> | |
667 | ||
668 | <div class="form-group"> | |
669 | <label i18n for="signupLimit">Your Twitter username</label> | |
670 | ||
671 | <input | |
672 | type="text" id="servicesTwitterUsername" class="form-control" | |
673 | formControlName="username" [ngClass]="{ 'input-error': formErrors['services.twitter.username'] }" | |
674 | > | |
675 | <div *ngIf="formErrors.services.twitter.username" class="form-error">{{ formErrors.services.twitter.username }}</div> | |
676 | </div> | |
677 | ||
678 | <div class="form-group"> | |
679 | <my-peertube-checkbox inputName="servicesTwitterWhitelisted" formControlName="whitelisted"> | |
680 | <ng-template ptTemplate="label"> | |
681 | <ng-container i18n>Instance allowed by Twitter</ng-container> | |
682 | </ng-template> | |
683 | ||
684 | <ng-template ptTemplate="help"> | |
685 | <ng-container i18n> | |
686 | If your instance is explicitly allowed by Twitter, a video player will be embedded in the Twitter feed on PeerTube video share.<br /> | |
687 | If the instance is not, we use an image link card that will redirect to your PeerTube instance.<br /><br /> | |
688 | Check this checkbox, save the configuration and test with a video URL of your instance (https://example.com/videos/watch/blabla) on | |
689 | <a target='_blank' rel='noopener noreferrer' href='https://cards-dev.twitter.com/validator'>https://cards-dev.twitter.com/validator</a> | |
690 | to see if you instance is allowed. | |
691 | </ng-container> | |
692 | </ng-template> | |
693 | </my-peertube-checkbox> | |
694 | </div> | |
695 | ||
696 | </ng-container> | |
697 | </ng-container> | |
698 | ||
699 | </div> | |
700 | </div> | |
701 | </ng-template> | |
702 | </ng-container> | |
703 | ||
704 | <div ngbNavItem="live"> | |
705 | <a ngbNavLink i18n>Live streaming</a> | |
706 | ||
707 | <ng-template ngbNavContent> | |
708 | ||
709 | <div class="form-row mt-5"> | |
710 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
711 | <div i18n class="inner-form-title">LIVE</div> | |
712 | <div i18n class="inner-form-description"> | |
713 | Enable users of your instance to stream live. | |
714 | </div> | |
715 | </div> | |
716 | ||
717 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> | |
718 | ||
719 | <ng-container formGroupName="live"> | |
720 | ||
721 | <div class="form-group"> | |
722 | <my-peertube-checkbox inputName="liveEnabled" formControlName="enabled"> | |
723 | <ng-template ptTemplate="label"> | |
724 | <ng-container i18n>Allow live streaming</ng-container> | |
725 | </ng-template> | |
726 | ||
727 | <ng-container ngProjectAs="description" i18n> | |
728 | ⚠️ Enabling live streaming requires trust in your users and extra moderation work | |
729 | </ng-container> | |
730 | ||
731 | <ng-container ngProjectAs="extra"> | |
732 | ||
733 | <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isLiveEnabled() }"> | |
734 | <my-peertube-checkbox | |
735 | inputName="liveAllowReplay" formControlName="allowReplay" | |
736 | i18n-labelText labelText="Allow your users to automatically publish a replay of their live" | |
737 | > | |
738 | <ng-container ngProjectAs="description" i18n> | |
739 | If the user quota is reached, PeerTube will automatically terminate the live streaming | |
740 | </ng-container> | |
741 | </my-peertube-checkbox> | |
742 | </div> | |
743 | ||
744 | <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isLiveEnabled() }"> | |
745 | <label i18n for="liveMaxInstanceLives">Max lives created on your instance (-1 for "unlimited")</label> | |
746 | <input type="number" name="liveMaxInstanceLives" formControlName="maxInstanceLives" /> | |
747 | </div> | |
748 | ||
749 | <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isLiveEnabled() }"> | |
750 | <label i18n for="liveMaxUserLives">Max lives created per user (-1 for "unlimited")</label> | |
751 | <input type="number" name="liveMaxUserLives" formControlName="maxUserLives" /> | |
752 | </div> | |
753 | ||
754 | <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isLiveEnabled() }"> | |
755 | <label i18n for="liveMaxDuration">Max live duration</label> | |
756 | <div class="peertube-select-container"> | |
757 | <select id="liveMaxDuration" formControlName="maxDuration" class="form-control"> | |
758 | <option *ngFor="let liveMaxDurationOption of liveMaxDurationOptions" [value]="liveMaxDurationOption.value"> | |
759 | {{ liveMaxDurationOption.label }} | |
760 | </option> | |
761 | </select> | |
762 | </div> | |
763 | </div> | |
764 | ||
765 | <ng-container formGroupName="transcoding"> | |
766 | ||
767 | <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isLiveEnabled() }"> | |
768 | <my-peertube-checkbox | |
769 | inputName="liveTranscodingEnabled" formControlName="enabled" | |
770 | i18n-labelText labelText="Enable live transcoding" | |
771 | > | |
772 | <ng-container ngProjectAs="description" i18n> | |
773 | Requires a lot of CPU! | |
774 | </ng-container> | |
775 | </my-peertube-checkbox> | |
776 | </div> | |
777 | ||
778 | <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isLiveEnabled() || !isLiveTranscodingEnabled() }"> | |
779 | <label i18n for="liveTranscodingThreads">Live transcoding threads</label> | |
780 | <div class="peertube-select-container"> | |
781 | <select id="liveTranscodingThreads" formControlName="threads" class="form-control"> | |
782 | <option *ngFor="let transcodingThreadOption of transcodingThreadOptions" [value]="transcodingThreadOption.value"> | |
783 | {{ transcodingThreadOption.label }} | |
784 | </option> | |
785 | </select> | |
786 | </div> | |
787 | <div *ngIf="formErrors.live.transcoding.threads" class="form-error">{{ formErrors.live.transcoding.threads }}</div> | |
788 | </div> | |
789 | ||
790 | <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isLiveEnabled() || !isLiveTranscodingEnabled() }"> | |
791 | <label i18n for="liveTranscodingThreads">Live resolutions to generate</label> | |
792 | ||
793 | <div class="ml-2 mt-2 d-flex flex-column"> | |
794 | <ng-container formGroupName="resolutions"> | |
795 | <div class="form-group" *ngFor="let resolution of liveResolutions"> | |
796 | <my-peertube-checkbox | |
797 | [inputName]="getResolutionKey(resolution.id)" [formControlName]="resolution.id" | |
798 | labelText="{{resolution.label}}" | |
799 | > | |
800 | <ng-template *ngIf="resolution.description" ptTemplate="help"> | |
801 | <div [innerHTML]="resolution.description"></div> | |
802 | </ng-template> | |
803 | </my-peertube-checkbox> | |
804 | </div> | |
805 | </ng-container> | |
806 | </div> | |
807 | </div> | |
808 | </ng-container> | |
809 | </ng-container> | |
810 | </my-peertube-checkbox> | |
811 | </div> | |
812 | </ng-container> | |
813 | </div> | |
814 | </div> | |
815 | ||
816 | </ng-template> | |
817 | </div> | |
818 | ||
819 | <ng-container ngbNavItem="advanced-configuration"> | |
820 | <a ngbNavLink i18n>Advanced configuration</a> | |
821 | ||
822 | <ng-template ngbNavContent> | |
823 | ||
824 | <div class="form-row mt-5"> <!-- transcoding grid --> | |
825 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
826 | <div i18n class="inner-form-title">TRANSCODING</div> | |
827 | <div i18n class="inner-form-description"> | |
828 | Process uploaded videos so that they are in a streamable form that any device can play. Though costly in | |
829 | resources, this is a critical part of PeerTube, so tread carefully. | |
830 | </div> | |
831 | </div> | |
832 | ||
833 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> | |
834 | ||
835 | <ng-container formGroupName="transcoding"> | |
836 | ||
837 | <div class="form-group"> | |
838 | <my-peertube-checkbox inputName="transcodingEnabled" formControlName="enabled"> | |
839 | <ng-template ptTemplate="label"> | |
840 | <ng-container i18n>Transcoding enabled</ng-container> | |
841 | </ng-template> | |
842 | ||
843 | <ng-template ptTemplate="help"> | |
844 | <ng-container i18n>If you disable transcoding, many videos from your users will not work!</ng-container> | |
845 | </ng-template> | |
846 | ||
847 | <ng-container ngProjectAs="extra"> | |
848 | ||
849 | <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isTranscodingEnabled() }"> | |
850 | <my-peertube-checkbox | |
851 | inputName="transcodingAllowAdditionalExtensions" formControlName="allowAdditionalExtensions" | |
852 | i18n-labelText labelText="Allow additional extensions" | |
853 | > | |
854 | <ng-container ngProjectAs="description"> | |
855 | <span i18n>Allows users to upload .mkv, .mov, .avi, .wmv, .flv, .f4v, .3g2, .3gp, .mts, m2ts, .mxf, .nut videos.</span> | |
856 | </ng-container> | |
857 | </my-peertube-checkbox> | |
858 | </div> | |
859 | ||
860 | <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isTranscodingEnabled() }"> | |
861 | <my-peertube-checkbox | |
862 | inputName="transcodingAllowAudioFiles" formControlName="allowAudioFiles" | |
863 | i18n-labelText labelText="Allow audio files upload" | |
864 | > | |
865 | <ng-container ngProjectAs="description"> | |
866 | <span i18n>Allows users to upload audio files that will be merged with the preview file on upload.</span> | |
867 | </ng-container> | |
868 | </my-peertube-checkbox> | |
869 | </div> | |
870 | ||
871 | <ng-container formGroupName="webtorrent"> | |
872 | <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isTranscodingEnabled() }"> | |
873 | <my-peertube-checkbox | |
874 | inputName="transcodingWebTorrentEnabled" formControlName="enabled" | |
875 | i18n-labelText labelText="WebTorrent support enabled" | |
876 | > | |
877 | <ng-template ptTemplate="help"> | |
878 | <ng-container i18n> | |
879 | <strong>Experimental, we suggest you to not disable webtorrent support for now</strong> | |
880 | ||
881 | <p>If you also enabled HLS support, it will multiply videos storage by 2</p> | |
882 | ||
883 | <br /> | |
884 | ||
885 | <strong>If disabled, breaks federation with PeerTube instances < 2.1</strong> | |
886 | </ng-container> | |
887 | </ng-template> | |
888 | </my-peertube-checkbox> | |
889 | </div> | |
890 | </ng-container> | |
891 | ||
892 | <ng-container formGroupName="hls"> | |
893 | <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isTranscodingEnabled() }"> | |
894 | <my-peertube-checkbox | |
895 | inputName="transcodingHlsEnabled" formControlName="enabled" | |
896 | i18n-labelText labelText="HLS with P2P support enabled" | |
897 | > | |
898 | <ng-template ptTemplate="help"> | |
899 | <ng-container i18n> | |
900 | <strong>Requires ffmpeg >= 4.1</strong> | |
901 | ||
902 | <p>Generate HLS playlists and fragmented MP4 files resulting in a better playback than with the current default player:</p> | |
903 | <ul> | |
904 | <li>Resolution change is smoother</li> | |
905 | <li>Faster playback in particular with long videos</li> | |
906 | <li>More stable playback (less bugs/infinite loading)</li> | |
907 | </ul> | |
908 | ||
909 | <p>If you also enabled WebTorrent support, it will multiply videos storage by 2</p> | |
910 | </ng-container> | |
911 | </ng-template> | |
912 | </my-peertube-checkbox> | |
913 | </div> | |
914 | </ng-container> | |
915 | ||
916 | </ng-container> | |
917 | </my-peertube-checkbox> | |
918 | </div> | |
919 | ||
920 | <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isTranscodingEnabled() }"> | |
921 | <label i18n for="transcodingThreads">Transcoding threads</label> | |
922 | <div class="peertube-select-container"> | |
923 | <select id="transcodingThreads" formControlName="threads" class="form-control"> | |
924 | <option *ngFor="let transcodingThreadOption of transcodingThreadOptions" [value]="transcodingThreadOption.value"> | |
925 | {{ transcodingThreadOption.label }} | |
926 | </option> | |
927 | </select> | |
928 | </div> | |
929 | <div *ngIf="formErrors.transcoding.threads" class="form-error">{{ formErrors.transcoding.threads }}</div> | |
930 | </div> | |
931 | ||
932 | <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isTranscodingEnabled() }"> | |
933 | ||
934 | <label i18n>Resolutions to generate</label> | |
935 | ||
936 | <div class="ml-2 mt-2 d-flex flex-column"> | |
937 | <ng-container formGroupName="resolutions"> | |
938 | <div class="form-group" *ngFor="let resolution of resolutions"> | |
939 | <my-peertube-checkbox | |
940 | [inputName]="getResolutionKey(resolution.id)" [formControlName]="resolution.id" | |
941 | labelText="{{resolution.label}}" | |
942 | > | |
943 | <ng-template *ngIf="resolution.description" ptTemplate="help"> | |
944 | <div [innerHTML]="resolution.description"></div> | |
945 | </ng-template> | |
946 | </my-peertube-checkbox> | |
947 | </div> | |
948 | </ng-container> | |
949 | </div> | |
950 | ||
951 | </div> | |
952 | ||
953 | </ng-container> | |
954 | ||
955 | </div> | |
956 | </div> | |
957 | ||
958 | <div class="form-row mt-4"> <!-- cache grid --> | |
959 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
960 | <div i18n class="inner-form-title">CACHE</div> | |
961 | <div i18n class="inner-form-description"> | |
962 | Some files are not federated, and fetched when necessary. Define their caching policies. | |
963 | </div> | |
964 | </div> | |
965 | ||
966 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> | |
967 | ||
968 | <ng-container formGroupName="cache"> | |
969 | <div class="form-group" formGroupName="previews"> | |
970 | <label i18n for="cachePreviewsSize">Number of previews to keep in cache</label> | |
971 | <input | |
972 | type="number" min="0" id="cachePreviewsSize" class="form-control" | |
973 | formControlName="size" [ngClass]="{ 'input-error': formErrors['cache.previews.size'] }" | |
974 | > | |
975 | <div *ngIf="formErrors.cache.previews.size" class="form-error">{{ formErrors.cache.previews.size }}</div> | |
976 | </div> | |
977 | ||
978 | <div class="form-group" formGroupName="captions"> | |
979 | <label i18n for="cacheCaptionsSize">Number of video captions to keep in cache</label> | |
980 | <input | |
981 | type="number" min="0" id="cacheCaptionsSize" class="form-control" | |
982 | formControlName="size" [ngClass]="{ 'input-error': formErrors['cache.captions.size'] }" | |
983 | > | |
984 | <div *ngIf="formErrors.cache.captions.size" class="form-error">{{ formErrors.cache.captions.size }}</div> | |
985 | </div> | |
986 | </ng-container> | |
987 | ||
988 | </div> | |
989 | </div> | |
990 | ||
991 | <div class="form-row mt-4"> <!-- cache grid --> | |
992 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
993 | <div class="anchor" id="customizations"></div> <!-- customizations anchor --> | |
994 | <div i18n class="inner-form-title">CUSTOMIZATIONS</div> | |
995 | <div i18n class="inner-form-description"> | |
996 | Slight modifications to your PeerTube instance for when creating a plugin or theme is overkill. | |
997 | </div> | |
998 | </div> | |
999 | ||
1000 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> | |
1001 | ||
1002 | <ng-container formGroupName="instance"> | |
1003 | <ng-container formGroupName="customizations"> | |
1004 | <div class="form-group"> | |
1005 | <label i18n for="customizationJavascript">JavaScript</label> | |
1006 | <my-help> | |
1007 | <ng-template ptTemplate="customHtml"> | |
1008 | <ng-container i18n> | |
1009 | Write JavaScript code directly.<br />Example: <pre>console.log('my instance is amazing');</pre> | |
1010 | </ng-container> | |
1011 | </ng-template> | |
1012 | </my-help> | |
1013 | ||
1014 | <textarea | |
1015 | id="customizationJavascript" formControlName="javascript" class="form-control" | |
1016 | [ngClass]="{ 'input-error': formErrors['instance.customizations.javascript'] }" | |
1017 | ></textarea> | |
1018 | ||
1019 | <div *ngIf="formErrors.instance.customizations.javascript" class="form-error">{{ formErrors.instance.customizations.javascript }}</div> | |
1020 | </div> | |
1021 | ||
1022 | <div class="form-group"> | |
1023 | <label for="customizationCSS">CSS</label> | |
1024 | ||
1025 | <my-help> | |
1026 | <ng-template ptTemplate="customHtml"> | |
1027 | <ng-container i18n> | |
1028 | Write CSS code directly. Example:<br /><br /> | |
1029 | <pre> | |
1030 | #custom-css {{ '{' }} | |
1031 | color: red; | |
1032 | {{ '}' }} | |
1033 | </pre> | |
1034 | Prepend with <em>#custom-css</em> to override styles. Example:<br /><br /> | |
1035 | <pre> | |
1036 | #custom-css .logged-in-email {{ '{' }} | |
1037 | color: red; | |
1038 | {{ '}' }} | |
1039 | </pre> | |
1040 | </ng-container> | |
1041 | </ng-template> | |
1042 | </my-help> | |
1043 | ||
1044 | <textarea | |
1045 | id="customizationCSS" formControlName="css" class="form-control" | |
1046 | [ngClass]="{ 'input-error': formErrors['instance.customizations.css'] }" | |
1047 | ></textarea> | |
1048 | <div *ngIf="formErrors.instance.customizations.css" class="form-error">{{ formErrors.instance.customizations.css }}</div> | |
1049 | </div> | |
1050 | </ng-container> | |
1051 | </ng-container> | |
1052 | ||
1053 | </div> | |
1054 | </div> | |
1055 | ||
1056 | </ng-template> | |
1057 | </ng-container> | |
1058 | </div> | |
1059 | ||
1060 | <div [ngbNavOutlet]="nav"></div> | |
1061 | ||
1062 | <div class="form-row mt-4"> <!-- submit placement block --> | |
1063 | <div class="col-md-7 col-xl-5"></div> | |
1064 | <div class="col-md-5 col-xl-5"> | |
1065 | <span class="form-error submit-error" i18n *ngIf="!form.valid"> | |
1066 | It seems like the configuration is invalid. Please search for potential errors in the different tabs. | |
1067 | </span> | |
1068 | ||
1069 | <span class="form-error submit-error" i18n *ngIf="!hasLiveAllowReplayConsistentOptions()"> | |
1070 | You cannot allow live replay if you don't enable transcoding. | |
1071 | </span> | |
1072 | ||
1073 | <input (click)="formValidated()" type="submit" i18n-value value="Update configuration" [disabled]="!form.valid || !hasConsistentOptions()"> | |
1074 | </div> | |
1075 | </div> | |
1076 | </form> |