]>
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 | ||
be04c6fd C |
177 | <div i18n class="inner-form-title">Other information</div> |
178 | ||
179 | <div class="form-group"> | |
180 | <label i18n for="instanceHardwareInformation">On what server/hardware the instance runs?</label> | |
181 | <div class="label-small-info">2vCore 2GB RAM/or directly the link to the server you rent etc</div> | |
182 | ||
183 | <my-markdown-textarea | |
184 | id="instanceHardwareInformation" formControlName="hardwareInformation" textareaWidth="500px" textareaHeight="75px" [previewColumn]="true" | |
185 | [classes]="{ 'input-error': formErrors['instance.hardwareInformation'] }" | |
186 | ></my-markdown-textarea> | |
187 | ||
188 | <div *ngIf="formErrors.instance.hardwareInformation" class="form-error">{{ formErrors.instance.hardwareInformation }}</div> | |
189 | </div> | |
190 | ||
3866f1a0 | 191 | </ng-container> |
ccc00cb2 C |
192 | </ng-template> |
193 | </ngb-tab> | |
63347a0f | 194 | |
ccc00cb2 C |
195 | <ngb-tab i18n-title title="Basic configuration"> |
196 | <ng-template ngbTabContent> | |
0dc64777 | 197 | |
ccc00cb2 | 198 | <div i18n class="inner-form-title">Theme & Default route</div> |
7cd4d2ba C |
199 | |
200 | <ng-container formGroupName="theme"> | |
201 | <div class="form-group"> | |
202 | <label i18n for="themeDefault">Global theme</label> | |
203 | ||
204 | <div class="peertube-select-container"> | |
205 | <select formControlName="default" id="themeDefault"> | |
206 | <option i18n value="default">default</option> | |
207 | ||
208 | <option *ngFor="let theme of availableThemes" [value]="theme">{{ theme }}</option> | |
209 | </select> | |
210 | </div> | |
211 | </div> | |
212 | </ng-container> | |
213 | ||
214 | ||
ccc00cb2 C |
215 | <div class="form-group" formGroupName="instance"> |
216 | <label i18n for="instanceDefaultClientRoute">Default client route</label> | |
217 | <div class="peertube-select-container"> | |
218 | <select id="instanceDefaultClientRoute" formControlName="defaultClientRoute"> | |
219 | <option i18n value="/videos/overview">Videos Discover</option> | |
220 | <option i18n value="/videos/trending">Videos Trending</option> | |
221 | <option i18n value="/videos/recently-added">Videos Recently Added</option> | |
222 | <option i18n value="/videos/local">Local videos</option> | |
223 | </select> | |
224 | </div> | |
225 | <div *ngIf="formErrors.instance.defaultClientRoute" class="form-error">{{ formErrors.instance.defaultClientRoute }}</div> | |
226 | </div> | |
227 | ||
3866f1a0 | 228 | <div i18n class="inner-form-title">Signup</div> |
63347a0f | 229 | |
3866f1a0 C |
230 | <ng-container formGroupName="signup"> |
231 | <div class="form-group"> | |
232 | <my-peertube-checkbox | |
233 | inputName="signupEnabled" formControlName="enabled" | |
234 | i18n-labelText labelText="Signup enabled" | |
235 | ></my-peertube-checkbox> | |
63347a0f | 236 | </div> |
3866f1a0 C |
237 | |
238 | <div class="form-group"> | |
239 | <my-peertube-checkbox *ngIf="isSignupEnabled()" | |
240 | inputName="signupRequiresEmailVerification" formControlName="requiresEmailVerification" | |
241 | i18n-labelText labelText="Signup requires email verification" | |
242 | ></my-peertube-checkbox> | |
63347a0f | 243 | </div> |
63347a0f | 244 | |
3866f1a0 C |
245 | <div *ngIf="isSignupEnabled()" class="form-group"> |
246 | <label i18n for="signupLimit">Signup limit</label> | |
247 | <input | |
248 | type="text" id="signupLimit" | |
249 | formControlName="limit" [ngClass]="{ 'input-error': formErrors['signup.limit'] }" | |
250 | > | |
251 | <div *ngIf="formErrors.signup.limit" class="form-error">{{ formErrors.signup.limit }}</div> | |
252 | </div> | |
253 | </ng-container> | |
63347a0f | 254 | |
0dc64777 | 255 | |
3866f1a0 | 256 | <div i18n class="inner-form-title">Users</div> |
63347a0f | 257 | |
3866f1a0 C |
258 | <ng-container formGroupName="user"> |
259 | <div class="form-group"> | |
260 | <label i18n for="userVideoQuota">User default video quota</label> | |
261 | <div class="peertube-select-container"> | |
262 | <select id="userVideoQuota" formControlName="videoQuota"> | |
263 | <option *ngFor="let videoQuotaOption of videoQuotaOptions" [value]="videoQuotaOption.value"> | |
264 | {{ videoQuotaOption.label }} | |
265 | </option> | |
266 | </select> | |
267 | </div> | |
268 | <div *ngIf="formErrors.user.videoQuota" class="form-error">{{ formErrors.user.videoQuota }}</div> | |
269 | </div> | |
d9eaee39 | 270 | |
3866f1a0 C |
271 | <div class="form-group"> |
272 | <label i18n for="userVideoQuotaDaily">User default daily upload limit</label> | |
273 | <div class="peertube-select-container"> | |
274 | <select id="userVideoQuotaDaily" formControlName="videoQuotaDaily"> | |
275 | <option *ngFor="let videoQuotaDailyOption of videoQuotaDailyOptions" [value]="videoQuotaDailyOption.value"> | |
276 | {{ videoQuotaDailyOption.label }} | |
277 | </option> | |
278 | </select> | |
279 | </div> | |
280 | <div *ngIf="formErrors.user.videoQuotaDaily" class="form-error">{{ formErrors.user.videoQuotaDaily }}</div> | |
63347a0f | 281 | </div> |
3866f1a0 | 282 | </ng-container> |
8be1afa1 | 283 | |
0dc64777 | 284 | |
63347a0f C |
285 | <div i18n class="inner-form-title">Import</div> |
286 | ||
3866f1a0 C |
287 | <ng-container formGroupName="import"> |
288 | <ng-container formGroupName="videos"> | |
8be1afa1 | 289 | |
3866f1a0 C |
290 | <div class="form-group" formGroupName="http"> |
291 | <my-peertube-checkbox | |
292 | inputName="importVideosHttpEnabled" formControlName="enabled" | |
293 | i18n-labelText labelText="Video import with HTTP URL (i.e. YouTube) enabled" | |
294 | ></my-peertube-checkbox> | |
295 | </div> | |
296 | ||
297 | <div class="form-group" formGroupName="torrent"> | |
298 | <my-peertube-checkbox | |
299 | inputName="importVideosTorrentEnabled" formControlName="enabled" | |
300 | i18n-labelText labelText="Video import with a torrent file or a magnet URI enabled" | |
301 | ></my-peertube-checkbox> | |
302 | </div> | |
303 | ||
304 | </ng-container> | |
305 | </ng-container> | |
8be1afa1 | 306 | |
0dc64777 | 307 | |
7ccddd7b JM |
308 | <div i18n class="inner-form-title">Auto-blacklist</div> |
309 | ||
310 | <ng-container formGroupName="autoBlacklist"> | |
311 | <ng-container formGroupName="videos"> | |
312 | <ng-container formGroupName="ofUsers"> | |
313 | ||
314 | <div class="form-group"> | |
315 | <my-peertube-checkbox | |
316 | inputName="autoBlacklistVideosOfUsersEnabled" formControlName="enabled" | |
317 | i18n-labelText labelText="New videos of users automatically blacklisted enabled" | |
318 | ></my-peertube-checkbox> | |
319 | </div> | |
320 | ||
321 | </ng-container> | |
322 | </ng-container> | |
323 | </ng-container> | |
324 | ||
0dc64777 C |
325 | |
326 | <div i18n class="inner-form-title">Instance followers</div> | |
327 | ||
328 | <ng-container formGroupName="followers"> | |
329 | <ng-container formGroupName="instance"> | |
330 | ||
331 | <div class="form-group"> | |
332 | <my-peertube-checkbox | |
333 | inputName="followersInstanceEnabled" formControlName="enabled" | |
334 | i18n-labelText labelText="Other instances can follow your instance" | |
335 | ></my-peertube-checkbox> | |
336 | </div> | |
337 | ||
338 | <div class="form-group"> | |
339 | <my-peertube-checkbox | |
340 | inputName="followersInstanceManualApproval" formControlName="manualApproval" | |
341 | i18n-labelText labelText="Manually approve new instance follower" | |
342 | ></my-peertube-checkbox> | |
343 | </div> | |
344 | </ng-container> | |
345 | </ng-container> | |
346 | ||
e1b49ee5 C |
347 | <div i18n class="inner-form-title">Instance followings</div> |
348 | ||
349 | <ng-container formGroupName="followings"> | |
350 | <ng-container formGroupName="instance"> | |
351 | ||
352 | <ng-container formGroupName="autoFollowBack"> | |
353 | <div class="form-group"> | |
354 | <my-peertube-checkbox | |
355 | inputName="followingsInstanceAutoFollowBackEnabled" formControlName="enabled" | |
356 | i18n-labelText labelText="Automatically follow other instances that follow you" | |
357 | ></my-peertube-checkbox> | |
358 | </div> | |
359 | </ng-container> | |
360 | ||
361 | <ng-container formGroupName="autoFollowIndex"> | |
362 | <div class="form-group"> | |
363 | <my-peertube-checkbox | |
364 | inputName="followingsInstanceAutoFollowIndexEnabled" formControlName="enabled" | |
365 | i18n-labelText labelText="Automatically follow instance of the public index (below)" | |
366 | ></my-peertube-checkbox> | |
367 | </div> | |
368 | ||
369 | <div class="form-group"> | |
370 | <label i18n for="followingsInstanceAutoFollowIndexUrl">Index URL</label> | |
371 | <input | |
372 | type="text" id="followingsInstanceAutoFollowIndexUrl" | |
373 | formControlName="indexUrl" [ngClass]="{ 'input-error': formErrors['followings.instance.autoFollowIndex.indexUrl'] }" | |
374 | > | |
375 | <div *ngIf="formErrors.followings.instance.autoFollowIndex.indexUrl" class="form-error">{{ formErrors.followings.instance.autoFollowIndex.indexUrl }}</div> | |
376 | </div> | |
377 | ||
378 | </ng-container> | |
379 | </ng-container> | |
380 | </ng-container> | |
381 | ||
0dc64777 | 382 | |
63347a0f | 383 | <div i18n class="inner-form-title">Administrator</div> |
8be1afa1 | 384 | |
3866f1a0 | 385 | <div class="form-group" formGroupName="admin"> |
63347a0f C |
386 | <label i18n for="adminEmail">Admin email</label> |
387 | <input | |
388 | type="text" id="adminEmail" | |
3866f1a0 | 389 | formControlName="email" [ngClass]="{ 'input-error': formErrors['admin.email'] }" |
63347a0f | 390 | > |
3866f1a0 | 391 | <div *ngIf="formErrors.admin.email" class="form-error">{{ formErrors.admin.email }}</div> |
63347a0f | 392 | </div> |
8be1afa1 | 393 | |
3866f1a0 C |
394 | <div class="form-group" formGroupName="contactForm"> |
395 | <my-peertube-checkbox | |
396 | inputName="enableContactForm" formControlName="enabled" | |
397 | i18n-labelText labelText="Enable contact form" | |
398 | ></my-peertube-checkbox> | |
8be1afa1 | 399 | </div> |
bee0abff | 400 | |
63347a0f C |
401 | </ng-template> |
402 | </ngb-tab> | |
8be1afa1 | 403 | |
63347a0f C |
404 | <ngb-tab i18n-title title="Services"> |
405 | <ng-template ngbTabContent> | |
406 | <div i18n class="inner-form-title">Twitter</div> | |
0f7fedc3 | 407 | |
3866f1a0 C |
408 | <ng-container formGroupName="services"> |
409 | <ng-container formGroupName="twitter"> | |
410 | ||
411 | <div class="form-group"> | |
412 | <label i18n for="signupLimit">Your Twitter username</label> | |
421d935d C |
413 | |
414 | <my-help> | |
415 | <ng-template ptTemplate="customHtml"> | |
416 | <ng-container i18n>Indicates the Twitter account for the website or platform on which the content was published.</ng-container> | |
417 | </ng-template> | |
418 | </my-help> | |
419 | ||
3866f1a0 C |
420 | <input |
421 | type="text" id="servicesTwitterUsername" | |
422 | formControlName="username" [ngClass]="{ 'input-error': formErrors['services.twitter.username'] }" | |
423 | > | |
424 | <div *ngIf="formErrors.services.twitter.username" class="form-error">{{ formErrors.services.twitter.username }}</div> | |
425 | </div> | |
426 | ||
427 | <div class="form-group"> | |
421d935d C |
428 | <my-peertube-checkbox inputName="servicesTwitterWhitelisted" formControlName="whitelisted"> |
429 | <ng-template ptTemplate="label"> | |
430 | <ng-container i18n>Instance whitelisted by Twitter</ng-container> | |
431 | </ng-template> | |
432 | ||
433 | <ng-template ptTemplate="help"> | |
434 | <ng-container i18n> | |
435 | If your instance is whitelisted by Twitter, a video player will be embedded in the Twitter feed on PeerTube video share.<br /> | |
436 | If the instance is not whitelisted, we use an image link card that will redirect on your PeerTube instance.<br /><br /> | |
437 | Check this checkbox, save the configuration and test with a video URL of your instance (https://example.com/videos/watch/blabla) on | |
438 | <a target='_blank' rel='noopener noreferrer' href='https://cards-dev.twitter.com/validator'>https://cards-dev.twitter.com/validator</a> | |
439 | to see if you instance is whitelisted. | |
440 | </ng-container> | |
441 | </ng-template> | |
442 | </my-peertube-checkbox> | |
3866f1a0 C |
443 | </div> |
444 | ||
445 | </ng-container> | |
446 | </ng-container> | |
8be1afa1 | 447 | |
63347a0f C |
448 | </ng-template> |
449 | </ngb-tab> | |
450 | ||
451 | <ngb-tab i18n-title title="Advanced configuration"> | |
452 | <ng-template ngbTabContent> | |
453 | ||
454 | <div i18n class="inner-form-title">Transcoding</div> | |
455 | ||
3866f1a0 | 456 | <ng-container formGroupName="transcoding"> |
14e2014a | 457 | <div class="form-group"> |
421d935d C |
458 | <my-peertube-checkbox inputName="transcodingEnabled" formControlName="enabled"> |
459 | <ng-template ptTemplate="label"> | |
460 | <ng-container i18n>Transcoding enabled</ng-container> | |
461 | </ng-template> | |
462 | ||
463 | <ng-template ptTemplate="help"> | |
464 | <ng-container i18n>If you disable transcoding, many videos from your users will not work!</ng-container> | |
465 | </ng-template> | |
466 | </my-peertube-checkbox> | |
14e2014a C |
467 | </div> |
468 | ||
3866f1a0 C |
469 | <ng-container *ngIf="isTranscodingEnabled()"> |
470 | ||
471 | <div class="form-group"> | |
472 | <my-peertube-checkbox | |
473 | inputName="transcodingAllowAdditionalExtensions" formControlName="allowAdditionalExtensions" | |
474 | i18n-labelText labelText="Allow additional extensions" | |
421d935d C |
475 | > |
476 | <ng-template ptTemplate="help"> | |
477 | <ng-container i18n>Allow your users to upload .mkv, .mov, .avi, .flv videos</ng-container> | |
478 | </ng-template> | |
479 | </my-peertube-checkbox> | |
63347a0f | 480 | </div> |
3866f1a0 | 481 | |
536598cf C |
482 | <div class="form-group"> |
483 | <my-peertube-checkbox | |
484 | inputName="transcodingAllowAudioFiles" formControlName="allowAudioFiles" | |
485 | i18n-labelText labelText="Allow audio files upload" | |
421d935d C |
486 | > |
487 | <ng-template ptTemplate="help"> | |
488 | <ng-container i18n>Allow your users to upload audio files that will be merged with the preview file on upload</ng-container> | |
489 | </ng-template> | |
490 | </my-peertube-checkbox> | |
536598cf C |
491 | </div> |
492 | ||
3866f1a0 C |
493 | <div class="form-group"> |
494 | <label i18n for="transcodingThreads">Transcoding threads</label> | |
495 | <div class="peertube-select-container"> | |
496 | <select id="transcodingThreads" formControlName="threads"> | |
497 | <option *ngFor="let transcodingThreadOption of transcodingThreadOptions" [value]="transcodingThreadOption.value"> | |
498 | {{ transcodingThreadOption.label }} | |
499 | </option> | |
500 | </select> | |
501 | </div> | |
502 | <div *ngIf="formErrors.transcoding.threads" class="form-error">{{ formErrors.transcoding.threads }}</div> | |
63347a0f | 503 | </div> |
63347a0f | 504 | |
3866f1a0 C |
505 | <ng-container formGroupName="resolutions"> |
506 | <div class="form-group" *ngFor="let resolution of resolutions"> | |
507 | <my-peertube-checkbox | |
00aa1f0d C |
508 | [inputName]="getResolutionKey(resolution.id)" [formControlName]="resolution.id" |
509 | i18n-labelText labelText="Resolution {{resolution.label}} enabled" | |
3866f1a0 C |
510 | ></my-peertube-checkbox> |
511 | </div> | |
512 | </ng-container> | |
513 | ||
514 | </ng-container> | |
515 | </ng-container> | |
63347a0f C |
516 | |
517 | <div i18n class="inner-form-title"> | |
518 | Cache | |
519 | ||
421d935d C |
520 | <my-help> |
521 | <ng-template ptTemplate="customHtml"> | |
522 | <ng-container i18n>Some files are not federated (previews, captions). We fetch them directly from the origin instance and cache them.</ng-container> | |
523 | </ng-template> | |
524 | </my-help> | |
8be1afa1 | 525 | </div> |
63347a0f | 526 | |
3866f1a0 C |
527 | <ng-container formGroupName="cache"> |
528 | <div class="form-group" formGroupName="previews"> | |
529 | <label i18n for="cachePreviewsSize">Previews cache size</label> | |
530 | <input | |
531 | type="text" id="cachePreviewsSize" | |
532 | formControlName="size" [ngClass]="{ 'input-error': formErrors['cache.previews.size'] }" | |
533 | > | |
534 | <div *ngIf="formErrors.cache.previews.size" class="form-error">{{ formErrors.cache.previews.size }}</div> | |
63347a0f | 535 | </div> |
63347a0f | 536 | |
3866f1a0 C |
537 | <div class="form-group" formGroupName="captions"> |
538 | <label i18n for="cacheCaptionsSize">Video captions cache size</label> | |
539 | <input | |
540 | type="text" id="cacheCaptionsSize" | |
541 | formControlName="size" [ngClass]="{ 'input-error': formErrors['cache.captions.size'] }" | |
542 | > | |
543 | <div *ngIf="formErrors.cache.captions.size" class="form-error">{{ formErrors.cache.captions.size }}</div> | |
63347a0f | 544 | </div> |
3866f1a0 | 545 | </ng-container> |
63347a0f C |
546 | |
547 | <div i18n class="inner-form-title">Customizations</div> | |
548 | ||
3866f1a0 C |
549 | <ng-container formGroupName="instance"> |
550 | <ng-container formGroupName="customizations"> | |
551 | <div class="form-group"> | |
552 | <label i18n for="customizationJavascript">JavaScript</label> | |
421d935d C |
553 | <my-help> |
554 | <ng-template ptTemplate="customHtml"> | |
555 | <ng-container i18n> | |
556 | Write directly JavaScript code.<br />Example: <pre>console.log('my instance is amazing');</pre> | |
557 | </ng-container> | |
558 | </ng-template> | |
559 | </my-help> | |
560 | ||
3866f1a0 C |
561 | <textarea |
562 | id="customizationJavascript" formControlName="javascript" | |
563 | [ngClass]="{ 'input-error': formErrors['instance.customizations.javascript'] }" | |
564 | ></textarea> | |
421d935d | 565 | |
3866f1a0 C |
566 | <div *ngIf="formErrors.instance.customizations.javascript" class="form-error">{{ formErrors.instance.customizations.javascript }}</div> |
567 | </div> | |
568 | ||
569 | <div class="form-group"> | |
570 | <label for="customizationCSS">CSS</label> | |
421d935d C |
571 | |
572 | <my-help> | |
573 | <ng-template ptTemplate="customHtml"> | |
574 | <ng-container i18n> | |
7113b5cd | 575 | Write directly CSS code. Example:<br /><br /> |
421d935d C |
576 | <pre> |
577 | #custom-css {{ '{' }} | |
578 | color: red; | |
579 | {{ '}' }} | |
580 | </pre> | |
3866f1a0 | 581 | |
7113b5cd | 582 | Prepend with <em>#custom-css</em> to override styles. Example:<br /><br /> |
421d935d C |
583 | <pre> |
584 | #custom-css .logged-in-email {{ '{' }} | |
585 | color: red; | |
586 | {{ '}' }} | |
587 | </pre> | |
588 | </ng-container> | |
589 | </ng-template> | |
590 | </my-help> | |
591 | ||
3866f1a0 C |
592 | <textarea |
593 | id="customizationCSS" formControlName="css" | |
594 | [ngClass]="{ 'input-error': formErrors['instance.customizations.css'] }" | |
595 | ></textarea> | |
596 | <div *ngIf="formErrors.instance.customizations.css" class="form-error">{{ formErrors.instance.customizations.css }}</div> | |
597 | </div> | |
598 | </ng-container> | |
599 | </ng-container> | |
63347a0f | 600 | |
63347a0f C |
601 | </ng-template> |
602 | </ngb-tab> | |
603 | </ngb-tabset> | |
00b5556c | 604 | |
b1d40cff | 605 | <input (click)="formValidated()" type="submit" i18n-value value="Update configuration" [disabled]="!form.valid"> |
d3662c1c | 606 | <span class="form-error" i18n *ngIf="!form.valid">It seems the configuration is invalid. Please search potential errors in the different tabs.</span> |
fd206f0b | 607 | </form> |