1 <form role=
"form" [formGroup]=
"form">
3 <ngb-tabset class=
"root-tabset bootstrap">
5 <ngb-tab i18n-title
title=
"Instance information">
6 <ng-template ngbTabContent
>
8 <ng-container formGroupName=
"instance">
10 <div i18n
class=
"inner-form-title">Instance
</div>
12 <div class=
"form-group">
13 <label i18n
for=
"instanceName">Name
</label>
15 type=
"text" id=
"instanceName"
16 formControlName=
"name" [ngClass]=
"{ 'input-error': formErrors.instance.name }"
18 <div *
ngIf=
"formErrors.instance.name" class=
"form-error">{{ formErrors.instance.name }}
</div>
21 <div class=
"form-group">
22 <label i18n
for=
"instanceShortDescription">Short description
</label>
24 id=
"instanceShortDescription" formControlName=
"shortDescription"
25 [ngClass]=
"{ 'input-error': formErrors['instance.shortDescription'] }"
27 <div *
ngIf=
"formErrors.instance.shortDescription" class=
"form-error">{{ formErrors.instance.shortDescription }}
</div>
30 <div class=
"form-group">
31 <label i18n
for=
"instanceDescription">Description
</label><my-help helpType=
"markdownText"></my-help>
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>
39 <div class=
"form-group">
40 <label i18n
for=
"instanceCategories">Main instance categories
</label>
44 inputId=
"instanceCategories" [options]=
"categoryItems" formControlName=
"categories" showToggleAll=
"false"
45 [defaultLabel]=
"getDefaultCategoryLabel()" [selectedItemsLabel]=
"getSelectedCategoryLabel()"
46 emptyFilterMessage=
"No results found" i18n-emptyFilterMessage
51 <div class=
"form-group">
52 <label i18n
for=
"instanceLanguages">Main languages you/your moderators speak
</label>
56 inputId=
"instanceLanguages" [options]=
"languageItems" formControlName=
"languages" showToggleAll=
"false"
57 [defaultLabel]=
"getDefaultLanguageLabel()" [selectedItemsLabel]=
"getSelectedLanguageLabel()"
58 emptyFilterMessage=
"No results found" i18n-emptyFilterMessage
63 <div i18n
class=
"inner-form-title">Moderation & NSFW
</div>
65 <div class=
"form-group">
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>
71 <ng-template ptTemplate=
"help">
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.
77 </my-peertube-checkbox>
80 <div class=
"form-group">
81 <label i18n
for=
"instanceDefaultNSFWPolicy">Policy on videos containing sensitive content
</label>
84 <ng-template ptTemplate=
"customHtml">
86 With
<strong>Do not list
</strong> or
<strong>Blur thumbnails
</strong>, a confirmation will be requested to watch the video.
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>
98 <div *
ngIf=
"formErrors.instance.defaultNSFWPolicy" class=
"form-error">{{ formErrors.instance.defaultNSFWPolicy }}
</div>
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>
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>
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>
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>
130 <div i18n
class=
"inner-form-title">You and your instance
</div>
132 <div class=
"form-group">
133 <label i18n
for=
"instanceAdministrator">Who is behind the instance?
</label>
134 <div class=
"label-small-info">A single person? A non profit? A company?
</div>
137 id=
"instanceAdministrator" formControlName=
"administrator"
138 [ngClass]=
"{ 'input-error': formErrors['instance.administrator'] }"
140 <div *
ngIf=
"formErrors.instance.administrator" class=
"form-error">{{ formErrors.instance.administrator }}
</div>
143 <div class=
"form-group">
144 <label i18n
for=
"instanceMaintenanceLifetime">How long do you plan to maintain this instance?
</label>
145 <div class=
"label-small-info">It's important to know for users who want to register on your instance
</div>
148 id=
"instanceMaintenanceLifetime" formControlName=
"maintenanceLifetime"
149 [ngClass]=
"{ 'input-error': formErrors['instance.maintenanceLifetime'] }"
151 <div *
ngIf=
"formErrors.instance.maintenanceLifetime" class=
"form-error">{{ formErrors.instance.maintenanceLifetime }}
</div>
154 <div class=
"form-group">
155 <label i18n
for=
"instanceBusinessModel">How will you pay the PeerTube instance server?
</label>
156 <div class=
"label-small-info">With you own funds? With users donations? Advertising?
</div>
159 id=
"instanceBusinessModel" formControlName=
"businessModel"
160 [ngClass]=
"{ 'input-error': formErrors['instance.businessModel'] }"
162 <div *
ngIf=
"formErrors.instance.businessModel" class=
"form-error">{{ formErrors.instance.businessModel }}
</div>
169 <ngb-tab i18n-title
title=
"Basic configuration">
170 <ng-template ngbTabContent
>
172 <div i18n
class=
"inner-form-title">Theme & Default route
</div>
174 <ng-container formGroupName=
"theme">
175 <div class=
"form-group">
176 <label i18n
for=
"themeDefault">Global theme
</label>
178 <div class=
"peertube-select-container">
179 <select formControlName=
"default" id=
"themeDefault">
180 <option i18n
value=
"default">default
</option>
182 <option *
ngFor=
"let theme of availableThemes" [value]=
"theme">{{ theme }}
</option>
189 <div class=
"form-group" formGroupName=
"instance">
190 <label i18n
for=
"instanceDefaultClientRoute">Default client route
</label>
191 <div class=
"peertube-select-container">
192 <select id=
"instanceDefaultClientRoute" formControlName=
"defaultClientRoute">
193 <option i18n
value=
"/videos/overview">Videos Discover
</option>
194 <option i18n
value=
"/videos/trending">Videos Trending
</option>
195 <option i18n
value=
"/videos/recently-added">Videos Recently Added
</option>
196 <option i18n
value=
"/videos/local">Local videos
</option>
199 <div *
ngIf=
"formErrors.instance.defaultClientRoute" class=
"form-error">{{ formErrors.instance.defaultClientRoute }}
</div>
202 <div i18n
class=
"inner-form-title">Signup
</div>
204 <ng-container formGroupName=
"signup">
205 <div class=
"form-group">
206 <my-peertube-checkbox
207 inputName=
"signupEnabled" formControlName=
"enabled"
208 i18n-labelText
labelText=
"Signup enabled"
209 ></my-peertube-checkbox>
212 <div class=
"form-group">
213 <my-peertube-checkbox *
ngIf=
"isSignupEnabled()"
214 inputName=
"signupRequiresEmailVerification" formControlName=
"requiresEmailVerification"
215 i18n-labelText
labelText=
"Signup requires email verification"
216 ></my-peertube-checkbox>
219 <div *
ngIf=
"isSignupEnabled()" class=
"form-group">
220 <label i18n
for=
"signupLimit">Signup limit
</label>
222 type=
"text" id=
"signupLimit"
223 formControlName=
"limit" [ngClass]=
"{ 'input-error': formErrors['signup.limit'] }"
225 <div *
ngIf=
"formErrors.signup.limit" class=
"form-error">{{ formErrors.signup.limit }}
</div>
230 <div i18n
class=
"inner-form-title">Users
</div>
232 <ng-container formGroupName=
"user">
233 <div class=
"form-group">
234 <label i18n
for=
"userVideoQuota">User default video quota
</label>
235 <div class=
"peertube-select-container">
236 <select id=
"userVideoQuota" formControlName=
"videoQuota">
237 <option *
ngFor=
"let videoQuotaOption of videoQuotaOptions" [value]=
"videoQuotaOption.value">
238 {{ videoQuotaOption.label }}
242 <div *
ngIf=
"formErrors.user.videoQuota" class=
"form-error">{{ formErrors.user.videoQuota }}
</div>
245 <div class=
"form-group">
246 <label i18n
for=
"userVideoQuotaDaily">User default daily upload limit
</label>
247 <div class=
"peertube-select-container">
248 <select id=
"userVideoQuotaDaily" formControlName=
"videoQuotaDaily">
249 <option *
ngFor=
"let videoQuotaDailyOption of videoQuotaDailyOptions" [value]=
"videoQuotaDailyOption.value">
250 {{ videoQuotaDailyOption.label }}
254 <div *
ngIf=
"formErrors.user.videoQuotaDaily" class=
"form-error">{{ formErrors.user.videoQuotaDaily }}
</div>
259 <div i18n
class=
"inner-form-title">Import
</div>
261 <ng-container formGroupName=
"import">
262 <ng-container formGroupName=
"videos">
264 <div class=
"form-group" formGroupName=
"http">
265 <my-peertube-checkbox
266 inputName=
"importVideosHttpEnabled" formControlName=
"enabled"
267 i18n-labelText
labelText=
"Video import with HTTP URL (i.e. YouTube) enabled"
268 ></my-peertube-checkbox>
271 <div class=
"form-group" formGroupName=
"torrent">
272 <my-peertube-checkbox
273 inputName=
"importVideosTorrentEnabled" formControlName=
"enabled"
274 i18n-labelText
labelText=
"Video import with a torrent file or a magnet URI enabled"
275 ></my-peertube-checkbox>
282 <div i18n
class=
"inner-form-title">Auto-blacklist
</div>
284 <ng-container formGroupName=
"autoBlacklist">
285 <ng-container formGroupName=
"videos">
286 <ng-container formGroupName=
"ofUsers">
288 <div class=
"form-group">
289 <my-peertube-checkbox
290 inputName=
"autoBlacklistVideosOfUsersEnabled" formControlName=
"enabled"
291 i18n-labelText
labelText=
"New videos of users automatically blacklisted enabled"
292 ></my-peertube-checkbox>
300 <div i18n
class=
"inner-form-title">Instance followers
</div>
302 <ng-container formGroupName=
"followers">
303 <ng-container formGroupName=
"instance">
305 <div class=
"form-group">
306 <my-peertube-checkbox
307 inputName=
"followersInstanceEnabled" formControlName=
"enabled"
308 i18n-labelText
labelText=
"Other instances can follow your instance"
309 ></my-peertube-checkbox>
312 <div class=
"form-group">
313 <my-peertube-checkbox
314 inputName=
"followersInstanceManualApproval" formControlName=
"manualApproval"
315 i18n-labelText
labelText=
"Manually approve new instance follower"
316 ></my-peertube-checkbox>
321 <div i18n
class=
"inner-form-title">Instance followings
</div>
323 <ng-container formGroupName=
"followings">
324 <ng-container formGroupName=
"instance">
326 <ng-container formGroupName=
"autoFollowBack">
327 <div class=
"form-group">
328 <my-peertube-checkbox
329 inputName=
"followingsInstanceAutoFollowBackEnabled" formControlName=
"enabled"
330 i18n-labelText
labelText=
"Automatically follow other instances that follow you"
331 ></my-peertube-checkbox>
335 <ng-container formGroupName=
"autoFollowIndex">
336 <div class=
"form-group">
337 <my-peertube-checkbox
338 inputName=
"followingsInstanceAutoFollowIndexEnabled" formControlName=
"enabled"
339 i18n-labelText
labelText=
"Automatically follow instance of the public index (below)"
340 ></my-peertube-checkbox>
343 <div class=
"form-group">
344 <label i18n
for=
"followingsInstanceAutoFollowIndexUrl">Index URL
</label>
346 type=
"text" id=
"followingsInstanceAutoFollowIndexUrl"
347 formControlName=
"indexUrl" [ngClass]=
"{ 'input-error': formErrors['followings.instance.autoFollowIndex.indexUrl'] }"
349 <div *
ngIf=
"formErrors.followings.instance.autoFollowIndex.indexUrl" class=
"form-error">{{ formErrors.followings.instance.autoFollowIndex.indexUrl }}
</div>
357 <div i18n
class=
"inner-form-title">Administrator
</div>
359 <div class=
"form-group" formGroupName=
"admin">
360 <label i18n
for=
"adminEmail">Admin email
</label>
362 type=
"text" id=
"adminEmail"
363 formControlName=
"email" [ngClass]=
"{ 'input-error': formErrors['admin.email'] }"
365 <div *
ngIf=
"formErrors.admin.email" class=
"form-error">{{ formErrors.admin.email }}
</div>
368 <div class=
"form-group" formGroupName=
"contactForm">
369 <my-peertube-checkbox
370 inputName=
"enableContactForm" formControlName=
"enabled"
371 i18n-labelText
labelText=
"Enable contact form"
372 ></my-peertube-checkbox>
378 <ngb-tab i18n-title
title=
"Services">
379 <ng-template ngbTabContent
>
380 <div i18n
class=
"inner-form-title">Twitter
</div>
382 <ng-container formGroupName=
"services">
383 <ng-container formGroupName=
"twitter">
385 <div class=
"form-group">
386 <label i18n
for=
"signupLimit">Your Twitter username
</label>
389 <ng-template ptTemplate=
"customHtml">
390 <ng-container i18n
>Indicates the Twitter account for the website or platform on which the content was published.
</ng-container>
395 type=
"text" id=
"servicesTwitterUsername"
396 formControlName=
"username" [ngClass]=
"{ 'input-error': formErrors['services.twitter.username'] }"
398 <div *
ngIf=
"formErrors.services.twitter.username" class=
"form-error">{{ formErrors.services.twitter.username }}
</div>
401 <div class=
"form-group">
402 <my-peertube-checkbox inputName=
"servicesTwitterWhitelisted" formControlName=
"whitelisted">
403 <ng-template ptTemplate=
"label">
404 <ng-container i18n
>Instance whitelisted by Twitter
</ng-container>
407 <ng-template ptTemplate=
"help">
409 If your instance is whitelisted by Twitter, a video player will be embedded in the Twitter feed on PeerTube video share.
<br />
410 If the instance is not whitelisted, we use an image link card that will redirect on your PeerTube instance.
<br /><br />
411 Check this checkbox, save the configuration and test with a video URL of your instance (https://example.com/videos/watch/blabla) on
412 <a target='_blank' rel='noopener noreferrer' href='https://cards-dev.twitter.com/validator'
>https://cards-dev.twitter.com/validator
</a>
413 to see if you instance is whitelisted.
416 </my-peertube-checkbox>
425 <ngb-tab i18n-title
title=
"Advanced configuration">
426 <ng-template ngbTabContent
>
428 <div i18n
class=
"inner-form-title">Transcoding
</div>
430 <ng-container formGroupName=
"transcoding">
431 <div class=
"form-group">
432 <my-peertube-checkbox inputName=
"transcodingEnabled" formControlName=
"enabled">
433 <ng-template ptTemplate=
"label">
434 <ng-container i18n
>Transcoding enabled
</ng-container>
437 <ng-template ptTemplate=
"help">
438 <ng-container i18n
>If you disable transcoding, many videos from your users will not work!
</ng-container>
440 </my-peertube-checkbox>
443 <ng-container *
ngIf=
"isTranscodingEnabled()">
445 <div class=
"form-group">
446 <my-peertube-checkbox
447 inputName=
"transcodingAllowAdditionalExtensions" formControlName=
"allowAdditionalExtensions"
448 i18n-labelText
labelText=
"Allow additional extensions"
450 <ng-template ptTemplate=
"help">
451 <ng-container i18n
>Allow your users to upload .mkv, .mov, .avi, .flv videos
</ng-container>
453 </my-peertube-checkbox>
456 <div class=
"form-group">
457 <my-peertube-checkbox
458 inputName=
"transcodingAllowAudioFiles" formControlName=
"allowAudioFiles"
459 i18n-labelText
labelText=
"Allow audio files upload"
461 <ng-template ptTemplate=
"help">
462 <ng-container i18n
>Allow your users to upload audio files that will be merged with the preview file on upload
</ng-container>
464 </my-peertube-checkbox>
467 <div class=
"form-group">
468 <label i18n
for=
"transcodingThreads">Transcoding threads
</label>
469 <div class=
"peertube-select-container">
470 <select id=
"transcodingThreads" formControlName=
"threads">
471 <option *
ngFor=
"let transcodingThreadOption of transcodingThreadOptions" [value]=
"transcodingThreadOption.value">
472 {{ transcodingThreadOption.label }}
476 <div *
ngIf=
"formErrors.transcoding.threads" class=
"form-error">{{ formErrors.transcoding.threads }}
</div>
479 <ng-container formGroupName=
"resolutions">
480 <div class=
"form-group" *
ngFor=
"let resolution of resolutions">
481 <my-peertube-checkbox
482 [inputName]=
"getResolutionKey(resolution.id)" [formControlName]=
"resolution.id"
483 i18n-labelText
labelText=
"Resolution {{resolution.label}} enabled"
484 ></my-peertube-checkbox>
491 <div i18n
class=
"inner-form-title">
495 <ng-template ptTemplate=
"customHtml">
496 <ng-container i18n
>Some files are not federated (previews, captions). We fetch them directly from the origin instance and cache them.
</ng-container>
501 <ng-container formGroupName=
"cache">
502 <div class=
"form-group" formGroupName=
"previews">
503 <label i18n
for=
"cachePreviewsSize">Previews cache size
</label>
505 type=
"text" id=
"cachePreviewsSize"
506 formControlName=
"size" [ngClass]=
"{ 'input-error': formErrors['cache.previews.size'] }"
508 <div *
ngIf=
"formErrors.cache.previews.size" class=
"form-error">{{ formErrors.cache.previews.size }}
</div>
511 <div class=
"form-group" formGroupName=
"captions">
512 <label i18n
for=
"cacheCaptionsSize">Video captions cache size
</label>
514 type=
"text" id=
"cacheCaptionsSize"
515 formControlName=
"size" [ngClass]=
"{ 'input-error': formErrors['cache.captions.size'] }"
517 <div *
ngIf=
"formErrors.cache.captions.size" class=
"form-error">{{ formErrors.cache.captions.size }}
</div>
521 <div i18n
class=
"inner-form-title">Customizations
</div>
523 <ng-container formGroupName=
"instance">
524 <ng-container formGroupName=
"customizations">
525 <div class=
"form-group">
526 <label i18n
for=
"customizationJavascript">JavaScript
</label>
528 <ng-template ptTemplate=
"customHtml">
530 Write directly JavaScript code.
<br />Example:
<pre>console.log('my instance is amazing');
</pre>
536 id=
"customizationJavascript" formControlName=
"javascript"
537 [ngClass]=
"{ 'input-error': formErrors['instance.customizations.javascript'] }"
540 <div *
ngIf=
"formErrors.instance.customizations.javascript" class=
"form-error">{{ formErrors.instance.customizations.javascript }}
</div>
543 <div class=
"form-group">
544 <label for=
"customizationCSS">CSS
</label>
547 <ng-template ptTemplate=
"customHtml">
549 Write directly CSS code. Example:
<br /><br />
551 #custom-css {{ '{' }}
556 Prepend with
<em>#custom-css
</em> to override styles. Example:
<br /><br />
558 #custom-css .logged-in-email {{ '{' }}
567 id=
"customizationCSS" formControlName=
"css"
568 [ngClass]=
"{ 'input-error': formErrors['instance.customizations.css'] }"
570 <div *
ngIf=
"formErrors.instance.customizations.css" class=
"form-error">{{ formErrors.instance.customizations.css }}
</div>
579 <input (click)=
"formValidated()" type=
"submit" i18n-value
value=
"Update configuration" [disabled]=
"!form.valid">
580 <span class=
"form-error" i18n *
ngIf=
"!form.valid">It seems the configuration is invalid. Please search potential errors in the different tabs.
</span>