]>
Commit | Line | Data |
---|---|---|
8a8e02a4 | 1 | <form role="form" [formGroup]="form"> |
fd206f0b | 2 | |
63347a0f | 3 | <ngb-tabset class="root-tabset bootstrap"> |
8be1afa1 | 4 | |
ccc00cb2 | 5 | <ngb-tab i18n-title title="Instance information"> |
63347a0f | 6 | <ng-template ngbTabContent> |
8be1afa1 | 7 | |
3866f1a0 | 8 | <ng-container formGroupName="instance"> |
ccc00cb2 C |
9 | |
10 | <div i18n class="inner-form-title">Instance</div> | |
11 | ||
3866f1a0 C |
12 | <div class="form-group"> |
13 | <label i18n for="instanceName">Name</label> | |
14 | <input | |
15 | type="text" id="instanceName" | |
16 | formControlName="name" [ngClass]="{ 'input-error': formErrors.instance.name }" | |
17 | > | |
18 | <div *ngIf="formErrors.instance.name" class="form-error">{{ formErrors.instance.name }}</div> | |
63347a0f | 19 | </div> |
63347a0f | 20 | |
3866f1a0 C |
21 | <div class="form-group"> |
22 | <label i18n for="instanceShortDescription">Short description</label> | |
23 | <textarea | |
8ae03c37 | 24 | id="instanceShortDescription" formControlName="shortDescription" class="small" |
3866f1a0 C |
25 | [ngClass]="{ 'input-error': formErrors['instance.shortDescription'] }" |
26 | ></textarea> | |
27 | <div *ngIf="formErrors.instance.shortDescription" class="form-error">{{ formErrors.instance.shortDescription }}</div> | |
63347a0f | 28 | </div> |
63347a0f | 29 | |
3866f1a0 C |
30 | <div class="form-group"> |
31 | <label i18n for="instanceDescription">Description</label><my-help helpType="markdownText"></my-help> | |
32 | <my-markdown-textarea | |
33 | id="instanceDescription" formControlName="description" textareaWidth="500px" [previewColumn]="true" | |
34 | [classes]="{ 'input-error': formErrors['instance.description'] }" | |
35 | ></my-markdown-textarea> | |
36 | <div *ngIf="formErrors.instance.description" class="form-error">{{ formErrors.instance.description }}</div> | |
63347a0f | 37 | </div> |
63347a0f | 38 | |
3866f1a0 | 39 | <div class="form-group"> |
ccc00cb2 C |
40 | <label i18n for="instanceCategories">Main instance categories</label> |
41 | ||
42 | <div> | |
43 | <p-multiSelect | |
44 | inputId="instanceCategories" [options]="categoryItems" formControlName="categories" showToggleAll="false" | |
45 | [defaultLabel]="getDefaultCategoryLabel()" [selectedItemsLabel]="getSelectedCategoryLabel()" | |
46 | emptyFilterMessage="No results found" i18n-emptyFilterMessage | |
47 | ></p-multiSelect> | |
48 | </div> | |
49 | </div> | |
50 | ||
51 | <div class="form-group"> | |
52 | <label i18n for="instanceLanguages">Main languages you/your moderators speak</label> | |
53 | ||
54 | <div> | |
55 | <p-multiSelect | |
56 | inputId="instanceLanguages" [options]="languageItems" formControlName="languages" showToggleAll="false" | |
57 | [defaultLabel]="getDefaultLanguageLabel()" [selectedItemsLabel]="getSelectedLanguageLabel()" | |
58 | emptyFilterMessage="No results found" i18n-emptyFilterMessage | |
59 | ></p-multiSelect> | |
60 | </div> | |
63347a0f | 61 | </div> |
63347a0f | 62 | |
ccc00cb2 C |
63 | <div i18n class="inner-form-title">Moderation & NSFW</div> |
64 | ||
f8802489 | 65 | <div class="form-group"> |
421d935d C |
66 | <my-peertube-checkbox inputName="instanceIsNSFW" formControlName="isNSFW"> |
67 | <ng-template ptTemplate="label"> | |
68 | <ng-container i18n>This instance is dedicated to sensitive or NSFW content</ng-container> | |
69 | </ng-template> | |
70 | ||
71 | <ng-template ptTemplate="help"> | |
72 | <ng-container i18n> | |
73 | Enabling it will allow other administrators to know that you are mainly federating sensitive content.<br /><br /> | |
74 | Moreover, the NSFW checkbox on video upload will be automatically checked by default. | |
75 | </ng-container> | |
76 | </ng-template> | |
77 | </my-peertube-checkbox> | |
f8802489 C |
78 | </div> |
79 | ||
3866f1a0 C |
80 | <div class="form-group"> |
81 | <label i18n for="instanceDefaultNSFWPolicy">Policy on videos containing sensitive content</label> | |
421d935d C |
82 | |
83 | <my-help> | |
84 | <ng-template ptTemplate="customHtml"> | |
85 | <ng-container i18n> | |
86 | With <strong>Do not list</strong> or <strong>Blur thumbnails</strong>, a confirmation will be requested to watch the video. | |
87 | </ng-container> | |
88 | </ng-template> | |
89 | </my-help> | |
3866f1a0 C |
90 | |
91 | <div class="peertube-select-container"> | |
92 | <select id="instanceDefaultNSFWPolicy" formControlName="defaultNSFWPolicy"> | |
93 | <option i18n value="do_not_list">Do not list</option> | |
94 | <option i18n value="blur">Blur thumbnails</option> | |
95 | <option i18n value="display">Display</option> | |
96 | </select> | |
97 | </div> | |
98 | <div *ngIf="formErrors.instance.defaultNSFWPolicy" class="form-error">{{ formErrors.instance.defaultNSFWPolicy }}</div> | |
63347a0f | 99 | </div> |
ccc00cb2 C |
100 | |
101 | <div class="form-group"> | |
102 | <label i18n for="instanceTerms">Terms</label><my-help helpType="markdownText"></my-help> | |
103 | <my-markdown-textarea | |
104 | id="instanceTerms" formControlName="terms" textareaWidth="500px" [previewColumn]="true" | |
105 | [ngClass]="{ 'input-error': formErrors['instance.terms'] }" | |
106 | ></my-markdown-textarea> | |
107 | <div *ngIf="formErrors.instance.terms" class="form-error">{{ formErrors.instance.terms }}</div> | |
108 | </div> | |
109 | ||
110 | <div class="form-group"> | |
111 | <label i18n for="instanceCodeOfConduct">Code of conduct</label><my-help helpType="markdownText"></my-help> | |
112 | <my-markdown-textarea | |
113 | id="instanceCodeOfConduct" formControlName="codeOfConduct" textareaWidth="500px" [previewColumn]="true" | |
114 | [ngClass]="{ 'input-error': formErrors['instance.codeOfConduct'] }" | |
115 | ></my-markdown-textarea> | |
116 | <div *ngIf="formErrors.instance.codeOfConduct" class="form-error">{{ formErrors.instance.codeOfConduct }}</div> | |
117 | </div> | |
118 | ||
119 | <div class="form-group"> | |
120 | <label i18n for="instanceModerationInformation">Moderation information</label><my-help helpType="markdownText"></my-help> | |
121 | <div class="label-small-info">Who moderates the instance? What is the policy regarding NSFW videos? Political videos? etc</div> | |
122 | ||
123 | <my-markdown-textarea | |
124 | id="instanceModerationInformation" formControlName="moderationInformation" textareaWidth="500px" [previewColumn]="true" | |
125 | [ngClass]="{ 'input-error': formErrors['instance.moderationInformation'] }" | |
126 | ></my-markdown-textarea> | |
127 | <div *ngIf="formErrors.instance.moderationInformation" class="form-error">{{ formErrors.instance.moderationInformation }}</div> | |
128 | </div> | |
129 | ||
130 | <div i18n class="inner-form-title">You and your instance</div> | |
131 | ||
132 | <div class="form-group"> | |
8ae03c37 | 133 | <label i18n for="instanceAdministrator">Who is behind the instance?</label> |
ccc00cb2 C |
134 | <div class="label-small-info">A single person? A non profit? A company?</div> |
135 | ||
8ae03c37 C |
136 | <my-markdown-textarea |
137 | id="instanceAdministrator" formControlName="administrator" textareaWidth="500px" textareaHeight="75px" [previewColumn]="true" | |
138 | [classes]="{ 'input-error': formErrors['instance.administrator'] }" | |
139 | ></my-markdown-textarea> | |
140 | ||
141 | <div *ngIf="formErrors.instance.administrator" class="form-error">{{ formErrors.instance.administrator }}</div> | |
142 | </div> | |
143 | ||
144 | <div class="form-group"> | |
145 | <label i18n for="instanceCreationReason">Why did you create this instance?</label> | |
146 | <div class="label-small-info">To share your personal videos? To open registrations and allow people to upload what they want?</div> | |
147 | ||
ccc00cb2 | 148 | <textarea |
8ae03c37 C |
149 | id="instanceCreationReason" formControlName="creationReason" class="small" |
150 | [ngClass]="{ 'input-error': formErrors['instance.creationReason'] }" | |
ccc00cb2 | 151 | ></textarea> |
8ae03c37 | 152 | <div *ngIf="formErrors.instance.creationReason" class="form-error">{{ formErrors.instance.creationReason }}</div> |
ccc00cb2 C |
153 | </div> |
154 | ||
155 | <div class="form-group"> | |
156 | <label i18n for="instanceMaintenanceLifetime">How long do you plan to maintain this instance?</label> | |
157 | <div class="label-small-info">It's important to know for users who want to register on your instance</div> | |
158 | ||
159 | <textarea | |
8ae03c37 | 160 | id="instanceMaintenanceLifetime" formControlName="maintenanceLifetime" class="small" |
ccc00cb2 C |
161 | [ngClass]="{ 'input-error': formErrors['instance.maintenanceLifetime'] }" |
162 | ></textarea> | |
163 | <div *ngIf="formErrors.instance.maintenanceLifetime" class="form-error">{{ formErrors.instance.maintenanceLifetime }}</div> | |
164 | </div> | |
165 | ||
166 | <div class="form-group"> | |
167 | <label i18n for="instanceBusinessModel">How will you pay the PeerTube instance server?</label> | |
168 | <div class="label-small-info">With you own funds? With users donations? Advertising?</div> | |
169 | ||
170 | <textarea | |
8ae03c37 | 171 | id="instanceBusinessModel" formControlName="businessModel" class="small" |
ccc00cb2 C |
172 | [ngClass]="{ 'input-error': formErrors['instance.businessModel'] }" |
173 | ></textarea> | |
174 | <div *ngIf="formErrors.instance.businessModel" class="form-error">{{ formErrors.instance.businessModel }}</div> | |
175 | </div> | |
176 | ||
3866f1a0 | 177 | </ng-container> |
ccc00cb2 C |
178 | </ng-template> |
179 | </ngb-tab> | |
63347a0f | 180 | |
ccc00cb2 C |
181 | <ngb-tab i18n-title title="Basic configuration"> |
182 | <ng-template ngbTabContent> | |
0dc64777 | 183 | |
ccc00cb2 | 184 | <div i18n class="inner-form-title">Theme & Default route</div> |
7cd4d2ba C |
185 | |
186 | <ng-container formGroupName="theme"> | |
187 | <div class="form-group"> | |
188 | <label i18n for="themeDefault">Global theme</label> | |
189 | ||
190 | <div class="peertube-select-container"> | |
191 | <select formControlName="default" id="themeDefault"> | |
192 | <option i18n value="default">default</option> | |
193 | ||
194 | <option *ngFor="let theme of availableThemes" [value]="theme">{{ theme }}</option> | |
195 | </select> | |
196 | </div> | |
197 | </div> | |
198 | </ng-container> | |
199 | ||
200 | ||
ccc00cb2 C |
201 | <div class="form-group" formGroupName="instance"> |
202 | <label i18n for="instanceDefaultClientRoute">Default client route</label> | |
203 | <div class="peertube-select-container"> | |
204 | <select id="instanceDefaultClientRoute" formControlName="defaultClientRoute"> | |
205 | <option i18n value="/videos/overview">Videos Discover</option> | |
206 | <option i18n value="/videos/trending">Videos Trending</option> | |
207 | <option i18n value="/videos/recently-added">Videos Recently Added</option> | |
208 | <option i18n value="/videos/local">Local videos</option> | |
209 | </select> | |
210 | </div> | |
211 | <div *ngIf="formErrors.instance.defaultClientRoute" class="form-error">{{ formErrors.instance.defaultClientRoute }}</div> | |
212 | </div> | |
213 | ||
3866f1a0 | 214 | <div i18n class="inner-form-title">Signup</div> |
63347a0f | 215 | |
3866f1a0 C |
216 | <ng-container formGroupName="signup"> |
217 | <div class="form-group"> | |
218 | <my-peertube-checkbox | |
219 | inputName="signupEnabled" formControlName="enabled" | |
220 | i18n-labelText labelText="Signup enabled" | |
221 | ></my-peertube-checkbox> | |
63347a0f | 222 | </div> |
3866f1a0 C |
223 | |
224 | <div class="form-group"> | |
225 | <my-peertube-checkbox *ngIf="isSignupEnabled()" | |
226 | inputName="signupRequiresEmailVerification" formControlName="requiresEmailVerification" | |
227 | i18n-labelText labelText="Signup requires email verification" | |
228 | ></my-peertube-checkbox> | |
63347a0f | 229 | </div> |
63347a0f | 230 | |
3866f1a0 C |
231 | <div *ngIf="isSignupEnabled()" class="form-group"> |
232 | <label i18n for="signupLimit">Signup limit</label> | |
233 | <input | |
234 | type="text" id="signupLimit" | |
235 | formControlName="limit" [ngClass]="{ 'input-error': formErrors['signup.limit'] }" | |
236 | > | |
237 | <div *ngIf="formErrors.signup.limit" class="form-error">{{ formErrors.signup.limit }}</div> | |
238 | </div> | |
239 | </ng-container> | |
63347a0f | 240 | |
0dc64777 | 241 | |
3866f1a0 | 242 | <div i18n class="inner-form-title">Users</div> |
63347a0f | 243 | |
3866f1a0 C |
244 | <ng-container formGroupName="user"> |
245 | <div class="form-group"> | |
246 | <label i18n for="userVideoQuota">User default video quota</label> | |
247 | <div class="peertube-select-container"> | |
248 | <select id="userVideoQuota" formControlName="videoQuota"> | |
249 | <option *ngFor="let videoQuotaOption of videoQuotaOptions" [value]="videoQuotaOption.value"> | |
250 | {{ videoQuotaOption.label }} | |
251 | </option> | |
252 | </select> | |
253 | </div> | |
254 | <div *ngIf="formErrors.user.videoQuota" class="form-error">{{ formErrors.user.videoQuota }}</div> | |
255 | </div> | |
d9eaee39 | 256 | |
3866f1a0 C |
257 | <div class="form-group"> |
258 | <label i18n for="userVideoQuotaDaily">User default daily upload limit</label> | |
259 | <div class="peertube-select-container"> | |
260 | <select id="userVideoQuotaDaily" formControlName="videoQuotaDaily"> | |
261 | <option *ngFor="let videoQuotaDailyOption of videoQuotaDailyOptions" [value]="videoQuotaDailyOption.value"> | |
262 | {{ videoQuotaDailyOption.label }} | |
263 | </option> | |
264 | </select> | |
265 | </div> | |
266 | <div *ngIf="formErrors.user.videoQuotaDaily" class="form-error">{{ formErrors.user.videoQuotaDaily }}</div> | |
63347a0f | 267 | </div> |
3866f1a0 | 268 | </ng-container> |
8be1afa1 | 269 | |
0dc64777 | 270 | |
63347a0f C |
271 | <div i18n class="inner-form-title">Import</div> |
272 | ||
3866f1a0 C |
273 | <ng-container formGroupName="import"> |
274 | <ng-container formGroupName="videos"> | |
8be1afa1 | 275 | |
3866f1a0 C |
276 | <div class="form-group" formGroupName="http"> |
277 | <my-peertube-checkbox | |
278 | inputName="importVideosHttpEnabled" formControlName="enabled" | |
279 | i18n-labelText labelText="Video import with HTTP URL (i.e. YouTube) enabled" | |
280 | ></my-peertube-checkbox> | |
281 | </div> | |
282 | ||
283 | <div class="form-group" formGroupName="torrent"> | |
284 | <my-peertube-checkbox | |
285 | inputName="importVideosTorrentEnabled" formControlName="enabled" | |
286 | i18n-labelText labelText="Video import with a torrent file or a magnet URI enabled" | |
287 | ></my-peertube-checkbox> | |
288 | </div> | |
289 | ||
290 | </ng-container> | |
291 | </ng-container> | |
8be1afa1 | 292 | |
0dc64777 | 293 | |
7ccddd7b JM |
294 | <div i18n class="inner-form-title">Auto-blacklist</div> |
295 | ||
296 | <ng-container formGroupName="autoBlacklist"> | |
297 | <ng-container formGroupName="videos"> | |
298 | <ng-container formGroupName="ofUsers"> | |
299 | ||
300 | <div class="form-group"> | |
301 | <my-peertube-checkbox | |
302 | inputName="autoBlacklistVideosOfUsersEnabled" formControlName="enabled" | |
303 | i18n-labelText labelText="New videos of users automatically blacklisted enabled" | |
304 | ></my-peertube-checkbox> | |
305 | </div> | |
306 | ||
307 | </ng-container> | |
308 | </ng-container> | |
309 | </ng-container> | |
310 | ||
0dc64777 C |
311 | |
312 | <div i18n class="inner-form-title">Instance followers</div> | |
313 | ||
314 | <ng-container formGroupName="followers"> | |
315 | <ng-container formGroupName="instance"> | |
316 | ||
317 | <div class="form-group"> | |
318 | <my-peertube-checkbox | |
319 | inputName="followersInstanceEnabled" formControlName="enabled" | |
320 | i18n-labelText labelText="Other instances can follow your instance" | |
321 | ></my-peertube-checkbox> | |
322 | </div> | |
323 | ||
324 | <div class="form-group"> | |
325 | <my-peertube-checkbox | |
326 | inputName="followersInstanceManualApproval" formControlName="manualApproval" | |
327 | i18n-labelText labelText="Manually approve new instance follower" | |
328 | ></my-peertube-checkbox> | |
329 | </div> | |
330 | </ng-container> | |
331 | </ng-container> | |
332 | ||
e1b49ee5 C |
333 | <div i18n class="inner-form-title">Instance followings</div> |
334 | ||
335 | <ng-container formGroupName="followings"> | |
336 | <ng-container formGroupName="instance"> | |
337 | ||
338 | <ng-container formGroupName="autoFollowBack"> | |
339 | <div class="form-group"> | |
340 | <my-peertube-checkbox | |
341 | inputName="followingsInstanceAutoFollowBackEnabled" formControlName="enabled" | |
342 | i18n-labelText labelText="Automatically follow other instances that follow you" | |
343 | ></my-peertube-checkbox> | |
344 | </div> | |
345 | </ng-container> | |
346 | ||
347 | <ng-container formGroupName="autoFollowIndex"> | |
348 | <div class="form-group"> | |
349 | <my-peertube-checkbox | |
350 | inputName="followingsInstanceAutoFollowIndexEnabled" formControlName="enabled" | |
351 | i18n-labelText labelText="Automatically follow instance of the public index (below)" | |
352 | ></my-peertube-checkbox> | |
353 | </div> | |
354 | ||
355 | <div class="form-group"> | |
356 | <label i18n for="followingsInstanceAutoFollowIndexUrl">Index URL</label> | |
357 | <input | |
358 | type="text" id="followingsInstanceAutoFollowIndexUrl" | |
359 | formControlName="indexUrl" [ngClass]="{ 'input-error': formErrors['followings.instance.autoFollowIndex.indexUrl'] }" | |
360 | > | |
361 | <div *ngIf="formErrors.followings.instance.autoFollowIndex.indexUrl" class="form-error">{{ formErrors.followings.instance.autoFollowIndex.indexUrl }}</div> | |
362 | </div> | |
363 | ||
364 | </ng-container> | |
365 | </ng-container> | |
366 | </ng-container> | |
367 | ||
0dc64777 | 368 | |
63347a0f | 369 | <div i18n class="inner-form-title">Administrator</div> |
8be1afa1 | 370 | |
3866f1a0 | 371 | <div class="form-group" formGroupName="admin"> |
63347a0f C |
372 | <label i18n for="adminEmail">Admin email</label> |
373 | <input | |
374 | type="text" id="adminEmail" | |
3866f1a0 | 375 | formControlName="email" [ngClass]="{ 'input-error': formErrors['admin.email'] }" |
63347a0f | 376 | > |
3866f1a0 | 377 | <div *ngIf="formErrors.admin.email" class="form-error">{{ formErrors.admin.email }}</div> |
63347a0f | 378 | </div> |
8be1afa1 | 379 | |
3866f1a0 C |
380 | <div class="form-group" formGroupName="contactForm"> |
381 | <my-peertube-checkbox | |
382 | inputName="enableContactForm" formControlName="enabled" | |
383 | i18n-labelText labelText="Enable contact form" | |
384 | ></my-peertube-checkbox> | |
8be1afa1 | 385 | </div> |
bee0abff | 386 | |
63347a0f C |
387 | </ng-template> |
388 | </ngb-tab> | |
8be1afa1 | 389 | |
63347a0f C |
390 | <ngb-tab i18n-title title="Services"> |
391 | <ng-template ngbTabContent> | |
392 | <div i18n class="inner-form-title">Twitter</div> | |
0f7fedc3 | 393 | |
3866f1a0 C |
394 | <ng-container formGroupName="services"> |
395 | <ng-container formGroupName="twitter"> | |
396 | ||
397 | <div class="form-group"> | |
398 | <label i18n for="signupLimit">Your Twitter username</label> | |
421d935d C |
399 | |
400 | <my-help> | |
401 | <ng-template ptTemplate="customHtml"> | |
402 | <ng-container i18n>Indicates the Twitter account for the website or platform on which the content was published.</ng-container> | |
403 | </ng-template> | |
404 | </my-help> | |
405 | ||
3866f1a0 C |
406 | <input |
407 | type="text" id="servicesTwitterUsername" | |
408 | formControlName="username" [ngClass]="{ 'input-error': formErrors['services.twitter.username'] }" | |
409 | > | |
410 | <div *ngIf="formErrors.services.twitter.username" class="form-error">{{ formErrors.services.twitter.username }}</div> | |
411 | </div> | |
412 | ||
413 | <div class="form-group"> | |
421d935d C |
414 | <my-peertube-checkbox inputName="servicesTwitterWhitelisted" formControlName="whitelisted"> |
415 | <ng-template ptTemplate="label"> | |
416 | <ng-container i18n>Instance whitelisted by Twitter</ng-container> | |
417 | </ng-template> | |
418 | ||
419 | <ng-template ptTemplate="help"> | |
420 | <ng-container i18n> | |
421 | If your instance is whitelisted by Twitter, a video player will be embedded in the Twitter feed on PeerTube video share.<br /> | |
422 | If the instance is not whitelisted, we use an image link card that will redirect on your PeerTube instance.<br /><br /> | |
423 | Check this checkbox, save the configuration and test with a video URL of your instance (https://example.com/videos/watch/blabla) on | |
424 | <a target='_blank' rel='noopener noreferrer' href='https://cards-dev.twitter.com/validator'>https://cards-dev.twitter.com/validator</a> | |
425 | to see if you instance is whitelisted. | |
426 | </ng-container> | |
427 | </ng-template> | |
428 | </my-peertube-checkbox> | |
3866f1a0 C |
429 | </div> |
430 | ||
431 | </ng-container> | |
432 | </ng-container> | |
8be1afa1 | 433 | |
63347a0f C |
434 | </ng-template> |
435 | </ngb-tab> | |
436 | ||
437 | <ngb-tab i18n-title title="Advanced configuration"> | |
438 | <ng-template ngbTabContent> | |
439 | ||
440 | <div i18n class="inner-form-title">Transcoding</div> | |
441 | ||
3866f1a0 | 442 | <ng-container formGroupName="transcoding"> |
14e2014a | 443 | <div class="form-group"> |
421d935d C |
444 | <my-peertube-checkbox inputName="transcodingEnabled" formControlName="enabled"> |
445 | <ng-template ptTemplate="label"> | |
446 | <ng-container i18n>Transcoding enabled</ng-container> | |
447 | </ng-template> | |
448 | ||
449 | <ng-template ptTemplate="help"> | |
450 | <ng-container i18n>If you disable transcoding, many videos from your users will not work!</ng-container> | |
451 | </ng-template> | |
452 | </my-peertube-checkbox> | |
14e2014a C |
453 | </div> |
454 | ||
3866f1a0 C |
455 | <ng-container *ngIf="isTranscodingEnabled()"> |
456 | ||
457 | <div class="form-group"> | |
458 | <my-peertube-checkbox | |
459 | inputName="transcodingAllowAdditionalExtensions" formControlName="allowAdditionalExtensions" | |
460 | i18n-labelText labelText="Allow additional extensions" | |
421d935d C |
461 | > |
462 | <ng-template ptTemplate="help"> | |
463 | <ng-container i18n>Allow your users to upload .mkv, .mov, .avi, .flv videos</ng-container> | |
464 | </ng-template> | |
465 | </my-peertube-checkbox> | |
63347a0f | 466 | </div> |
3866f1a0 | 467 | |
536598cf C |
468 | <div class="form-group"> |
469 | <my-peertube-checkbox | |
470 | inputName="transcodingAllowAudioFiles" formControlName="allowAudioFiles" | |
471 | i18n-labelText labelText="Allow audio files upload" | |
421d935d C |
472 | > |
473 | <ng-template ptTemplate="help"> | |
474 | <ng-container i18n>Allow your users to upload audio files that will be merged with the preview file on upload</ng-container> | |
475 | </ng-template> | |
476 | </my-peertube-checkbox> | |
536598cf C |
477 | </div> |
478 | ||
3866f1a0 C |
479 | <div class="form-group"> |
480 | <label i18n for="transcodingThreads">Transcoding threads</label> | |
481 | <div class="peertube-select-container"> | |
482 | <select id="transcodingThreads" formControlName="threads"> | |
483 | <option *ngFor="let transcodingThreadOption of transcodingThreadOptions" [value]="transcodingThreadOption.value"> | |
484 | {{ transcodingThreadOption.label }} | |
485 | </option> | |
486 | </select> | |
487 | </div> | |
488 | <div *ngIf="formErrors.transcoding.threads" class="form-error">{{ formErrors.transcoding.threads }}</div> | |
63347a0f | 489 | </div> |
63347a0f | 490 | |
3866f1a0 C |
491 | <ng-container formGroupName="resolutions"> |
492 | <div class="form-group" *ngFor="let resolution of resolutions"> | |
493 | <my-peertube-checkbox | |
00aa1f0d C |
494 | [inputName]="getResolutionKey(resolution.id)" [formControlName]="resolution.id" |
495 | i18n-labelText labelText="Resolution {{resolution.label}} enabled" | |
3866f1a0 C |
496 | ></my-peertube-checkbox> |
497 | </div> | |
498 | </ng-container> | |
499 | ||
500 | </ng-container> | |
501 | </ng-container> | |
63347a0f C |
502 | |
503 | <div i18n class="inner-form-title"> | |
504 | Cache | |
505 | ||
421d935d C |
506 | <my-help> |
507 | <ng-template ptTemplate="customHtml"> | |
508 | <ng-container i18n>Some files are not federated (previews, captions). We fetch them directly from the origin instance and cache them.</ng-container> | |
509 | </ng-template> | |
510 | </my-help> | |
8be1afa1 | 511 | </div> |
63347a0f | 512 | |
3866f1a0 C |
513 | <ng-container formGroupName="cache"> |
514 | <div class="form-group" formGroupName="previews"> | |
515 | <label i18n for="cachePreviewsSize">Previews cache size</label> | |
516 | <input | |
517 | type="text" id="cachePreviewsSize" | |
518 | formControlName="size" [ngClass]="{ 'input-error': formErrors['cache.previews.size'] }" | |
519 | > | |
520 | <div *ngIf="formErrors.cache.previews.size" class="form-error">{{ formErrors.cache.previews.size }}</div> | |
63347a0f | 521 | </div> |
63347a0f | 522 | |
3866f1a0 C |
523 | <div class="form-group" formGroupName="captions"> |
524 | <label i18n for="cacheCaptionsSize">Video captions cache size</label> | |
525 | <input | |
526 | type="text" id="cacheCaptionsSize" | |
527 | formControlName="size" [ngClass]="{ 'input-error': formErrors['cache.captions.size'] }" | |
528 | > | |
529 | <div *ngIf="formErrors.cache.captions.size" class="form-error">{{ formErrors.cache.captions.size }}</div> | |
63347a0f | 530 | </div> |
3866f1a0 | 531 | </ng-container> |
63347a0f C |
532 | |
533 | <div i18n class="inner-form-title">Customizations</div> | |
534 | ||
3866f1a0 C |
535 | <ng-container formGroupName="instance"> |
536 | <ng-container formGroupName="customizations"> | |
537 | <div class="form-group"> | |
538 | <label i18n for="customizationJavascript">JavaScript</label> | |
421d935d C |
539 | <my-help> |
540 | <ng-template ptTemplate="customHtml"> | |
541 | <ng-container i18n> | |
542 | Write directly JavaScript code.<br />Example: <pre>console.log('my instance is amazing');</pre> | |
543 | </ng-container> | |
544 | </ng-template> | |
545 | </my-help> | |
546 | ||
3866f1a0 C |
547 | <textarea |
548 | id="customizationJavascript" formControlName="javascript" | |
549 | [ngClass]="{ 'input-error': formErrors['instance.customizations.javascript'] }" | |
550 | ></textarea> | |
421d935d | 551 | |
3866f1a0 C |
552 | <div *ngIf="formErrors.instance.customizations.javascript" class="form-error">{{ formErrors.instance.customizations.javascript }}</div> |
553 | </div> | |
554 | ||
555 | <div class="form-group"> | |
556 | <label for="customizationCSS">CSS</label> | |
421d935d C |
557 | |
558 | <my-help> | |
559 | <ng-template ptTemplate="customHtml"> | |
560 | <ng-container i18n> | |
7113b5cd | 561 | Write directly CSS code. Example:<br /><br /> |
421d935d C |
562 | <pre> |
563 | #custom-css {{ '{' }} | |
564 | color: red; | |
565 | {{ '}' }} | |
566 | </pre> | |
3866f1a0 | 567 | |
7113b5cd | 568 | Prepend with <em>#custom-css</em> to override styles. Example:<br /><br /> |
421d935d C |
569 | <pre> |
570 | #custom-css .logged-in-email {{ '{' }} | |
571 | color: red; | |
572 | {{ '}' }} | |
573 | </pre> | |
574 | </ng-container> | |
575 | </ng-template> | |
576 | </my-help> | |
577 | ||
3866f1a0 C |
578 | <textarea |
579 | id="customizationCSS" formControlName="css" | |
580 | [ngClass]="{ 'input-error': formErrors['instance.customizations.css'] }" | |
581 | ></textarea> | |
582 | <div *ngIf="formErrors.instance.customizations.css" class="form-error">{{ formErrors.instance.customizations.css }}</div> | |
583 | </div> | |
584 | </ng-container> | |
585 | </ng-container> | |
63347a0f | 586 | |
63347a0f C |
587 | </ng-template> |
588 | </ngb-tab> | |
589 | </ngb-tabset> | |
00b5556c | 590 | |
b1d40cff | 591 | <input (click)="formValidated()" type="submit" i18n-value value="Update configuration" [disabled]="!form.valid"> |
d3662c1c | 592 | <span class="form-error" i18n *ngIf="!form.valid">It seems the configuration is invalid. Please search potential errors in the different tabs.</span> |
fd206f0b | 593 | </form> |