1 <form role=
"form" [formGroup]=
"form">
3 <ngb-tabset class=
"root-tabset bootstrap">
5 <ngb-tab i18n-title
title=
"Basic configuration">
6 <ng-template ngbTabContent
>
8 <div i18n
class=
"inner-form-title">Instance
</div>
10 <ng-container formGroupName=
"instance">
11 <div class=
"form-group">
12 <label i18n
for=
"instanceName">Name
</label>
14 type=
"text" id=
"instanceName"
15 formControlName=
"name" [ngClass]=
"{ 'input-error': formErrors.instance.name }"
17 <div *
ngIf=
"formErrors.instance.name" class=
"form-error">{{ formErrors.instance.name }}
</div>
20 <div class=
"form-group">
21 <label i18n
for=
"instanceShortDescription">Short description
</label>
23 id=
"instanceShortDescription" formControlName=
"shortDescription"
24 [ngClass]=
"{ 'input-error': formErrors['instance.shortDescription'] }"
26 <div *
ngIf=
"formErrors.instance.shortDescription" class=
"form-error">{{ formErrors.instance.shortDescription }}
</div>
29 <div class=
"form-group">
30 <label i18n
for=
"instanceDescription">Description
</label><my-help helpType=
"markdownText"></my-help>
32 id=
"instanceDescription" formControlName=
"description" textareaWidth=
"500px" [previewColumn]=
"true"
33 [classes]=
"{ 'input-error': formErrors['instance.description'] }"
34 ></my-markdown-textarea>
35 <div *
ngIf=
"formErrors.instance.description" class=
"form-error">{{ formErrors.instance.description }}
</div>
38 <div class=
"form-group">
39 <label i18n
for=
"instanceTerms">Terms
</label><my-help helpType=
"markdownText"></my-help>
41 id=
"instanceTerms" formControlName=
"terms" textareaWidth=
"500px" [previewColumn]=
"true"
42 [ngClass]=
"{ 'input-error': formErrors['instance.terms'] }"
43 ></my-markdown-textarea>
44 <div *
ngIf=
"formErrors.instance.terms" class=
"form-error">{{ formErrors.instance.terms }}
</div>
47 <div class=
"form-group">
48 <label i18n
for=
"instanceDefaultClientRoute">Default client route
</label>
49 <div class=
"peertube-select-container">
50 <select id=
"instanceDefaultClientRoute" formControlName=
"defaultClientRoute">
51 <option i18n
value=
"/videos/overview">Videos Overview
</option>
52 <option i18n
value=
"/videos/trending">Videos Trending
</option>
53 <option i18n
value=
"/videos/recently-added">Videos Recently Added
</option>
54 <option i18n
value=
"/videos/local">Local videos
</option>
57 <div *
ngIf=
"formErrors.instance.defaultClientRoute" class=
"form-error">{{ formErrors.instance.defaultClientRoute }}
</div>
60 <div class=
"form-group">
61 <label i18n
for=
"instanceDefaultNSFWPolicy">Policy on videos containing sensitive content
</label>
63 helpType=
"custom" i18n-customHtml
64 customHtml=
"With <strong>Do not list</strong> or <strong>Blur thumbnails</strong>, a confirmation will be requested to watch the video."
67 <div class=
"peertube-select-container">
68 <select id=
"instanceDefaultNSFWPolicy" formControlName=
"defaultNSFWPolicy">
69 <option i18n
value=
"do_not_list">Do not list
</option>
70 <option i18n
value=
"blur">Blur thumbnails
</option>
71 <option i18n
value=
"display">Display
</option>
74 <div *
ngIf=
"formErrors.instance.defaultNSFWPolicy" class=
"form-error">{{ formErrors.instance.defaultNSFWPolicy }}
</div>
78 <div i18n
class=
"inner-form-title">Signup
</div>
80 <ng-container formGroupName=
"signup">
81 <div class=
"form-group">
83 inputName=
"signupEnabled" formControlName=
"enabled"
84 i18n-labelText
labelText=
"Signup enabled"
85 ></my-peertube-checkbox>
88 <div class=
"form-group">
89 <my-peertube-checkbox *
ngIf=
"isSignupEnabled()"
90 inputName=
"signupRequiresEmailVerification" formControlName=
"requiresEmailVerification"
91 i18n-labelText
labelText=
"Signup requires email verification"
92 ></my-peertube-checkbox>
95 <div *
ngIf=
"isSignupEnabled()" class=
"form-group">
96 <label i18n
for=
"signupLimit">Signup limit
</label>
98 type=
"text" id=
"signupLimit"
99 formControlName=
"limit" [ngClass]=
"{ 'input-error': formErrors['signup.limit'] }"
101 <div *
ngIf=
"formErrors.signup.limit" class=
"form-error">{{ formErrors.signup.limit }}
</div>
105 <div i18n
class=
"inner-form-title">Users
</div>
107 <ng-container formGroupName=
"user">
108 <div class=
"form-group">
109 <label i18n
for=
"userVideoQuota">User default video quota
</label>
110 <div class=
"peertube-select-container">
111 <select id=
"userVideoQuota" formControlName=
"videoQuota">
112 <option *
ngFor=
"let videoQuotaOption of videoQuotaOptions" [value]=
"videoQuotaOption.value">
113 {{ videoQuotaOption.label }}
117 <div *
ngIf=
"formErrors.user.videoQuota" class=
"form-error">{{ formErrors.user.videoQuota }}
</div>
120 <div class=
"form-group">
121 <label i18n
for=
"userVideoQuotaDaily">User default daily upload limit
</label>
122 <div class=
"peertube-select-container">
123 <select id=
"userVideoQuotaDaily" formControlName=
"videoQuotaDaily">
124 <option *
ngFor=
"let videoQuotaDailyOption of videoQuotaDailyOptions" [value]=
"videoQuotaDailyOption.value">
125 {{ videoQuotaDailyOption.label }}
129 <div *
ngIf=
"formErrors.user.videoQuotaDaily" class=
"form-error">{{ formErrors.user.videoQuotaDaily }}
</div>
133 <div i18n
class=
"inner-form-title">Import
</div>
135 <ng-container formGroupName=
"import">
136 <ng-container formGroupName=
"videos">
138 <div class=
"form-group" formGroupName=
"http">
139 <my-peertube-checkbox
140 inputName=
"importVideosHttpEnabled" formControlName=
"enabled"
141 i18n-labelText
labelText=
"Video import with HTTP URL (i.e. YouTube) enabled"
142 ></my-peertube-checkbox>
145 <div class=
"form-group" formGroupName=
"torrent">
146 <my-peertube-checkbox
147 inputName=
"importVideosTorrentEnabled" formControlName=
"enabled"
148 i18n-labelText
labelText=
"Video import with a torrent file or a magnet URI enabled"
149 ></my-peertube-checkbox>
155 <div i18n
class=
"inner-form-title">Administrator
</div>
157 <div class=
"form-group" formGroupName=
"admin">
158 <label i18n
for=
"adminEmail">Admin email
</label>
160 type=
"text" id=
"adminEmail"
161 formControlName=
"email" [ngClass]=
"{ 'input-error': formErrors['admin.email'] }"
163 <div *
ngIf=
"formErrors.admin.email" class=
"form-error">{{ formErrors.admin.email }}
</div>
166 <div class=
"form-group" formGroupName=
"contactForm">
167 <my-peertube-checkbox
168 inputName=
"enableContactForm" formControlName=
"enabled"
169 i18n-labelText
labelText=
"Enable contact form"
170 ></my-peertube-checkbox>
176 <ngb-tab i18n-title
title=
"Services">
177 <ng-template ngbTabContent
>
178 <div i18n
class=
"inner-form-title">Twitter
</div>
180 <ng-container formGroupName=
"services">
181 <ng-container formGroupName=
"twitter">
183 <div class=
"form-group">
184 <label i18n
for=
"signupLimit">Your Twitter username
</label>
186 helpType=
"custom" i18n-customHtml
187 customHtml=
"Indicates the Twitter account for the website or platform on which the content was published."
190 type=
"text" id=
"servicesTwitterUsername"
191 formControlName=
"username" [ngClass]=
"{ 'input-error': formErrors['services.twitter.username'] }"
193 <div *
ngIf=
"formErrors.services.twitter.username" class=
"form-error">{{ formErrors.services.twitter.username }}
</div>
196 <div class=
"form-group">
197 <my-peertube-checkbox
198 inputName=
"servicesTwitterWhitelisted" formControlName=
"whitelisted"
199 i18n-labelText
labelText=
"Instance whitelisted by Twitter"
200 i18n-helpHtml
helpHtml=
"If your instance is whitelisted by Twitter, a video player will be embedded in the Twitter feed on PeerTube video share.<br />
201 If the instance is not whitelisted, we use an image link card that will redirect on your PeerTube instance.<br /><br />
202 Check this checkbox, save the configuration and test with a video URL of your instance (https://example.com/videos/watch/blabla) on <a target='_blank' rel='noopener noreferrer' href='https://cards-dev.twitter.com/validator'>https://cards-dev.twitter.com/validator</a> to see if you instance is whitelisted."
203 ></my-peertube-checkbox>
212 <ngb-tab i18n-title
title=
"Advanced configuration">
213 <ng-template ngbTabContent
>
215 <div i18n
class=
"inner-form-title">Transcoding
</div>
217 <ng-container formGroupName=
"transcoding">
218 <div class=
"form-group">
219 <my-peertube-checkbox
220 inputName=
"transcodingEnabled" formControlName=
"enabled"
221 i18n-labelText
labelText=
"Transcoding enabled"
222 i18n-helpHtml
helpHtml=
"If you disable transcoding, many videos from your users will not work!"
223 ></my-peertube-checkbox>
226 <ng-container *
ngIf=
"isTranscodingEnabled()">
228 <div class=
"form-group">
229 <my-peertube-checkbox
230 inputName=
"transcodingAllowAdditionalExtensions" formControlName=
"allowAdditionalExtensions"
231 i18n-labelText
labelText=
"Allow additional extensions"
232 i18n-helpHtml
helpHtml=
"Allow your users to upload .mkv, .mov, .avi, .flv videos"
233 ></my-peertube-checkbox>
236 <div class=
"form-group">
237 <label i18n
for=
"transcodingThreads">Transcoding threads
</label>
238 <div class=
"peertube-select-container">
239 <select id=
"transcodingThreads" formControlName=
"threads">
240 <option *
ngFor=
"let transcodingThreadOption of transcodingThreadOptions" [value]=
"transcodingThreadOption.value">
241 {{ transcodingThreadOption.label }}
245 <div *
ngIf=
"formErrors.transcoding.threads" class=
"form-error">{{ formErrors.transcoding.threads }}
</div>
248 <ng-container formGroupName=
"resolutions">
249 <div class=
"form-group" *
ngFor=
"let resolution of resolutions">
250 <my-peertube-checkbox
251 [inputName]=
"getResolutionKey(resolution)" [formControlName]=
"resolution"
252 i18n-labelText
labelText=
"Resolution {{resolution}} enabled"
253 ></my-peertube-checkbox>
260 <div i18n
class=
"inner-form-title">
264 helpType=
"custom" i18n-customHtml
265 customHtml=
"Some files are not federated (previews, captions). We fetch them directly from the origin instance and cache them."
269 <ng-container formGroupName=
"cache">
270 <div class=
"form-group" formGroupName=
"previews">
271 <label i18n
for=
"cachePreviewsSize">Previews cache size
</label>
273 type=
"text" id=
"cachePreviewsSize"
274 formControlName=
"size" [ngClass]=
"{ 'input-error': formErrors['cache.previews.size'] }"
276 <div *
ngIf=
"formErrors.cache.previews.size" class=
"form-error">{{ formErrors.cache.previews.size }}
</div>
279 <div class=
"form-group" formGroupName=
"captions">
280 <label i18n
for=
"cacheCaptionsSize">Video captions cache size
</label>
282 type=
"text" id=
"cacheCaptionsSize"
283 formControlName=
"size" [ngClass]=
"{ 'input-error': formErrors['cache.captions.size'] }"
285 <div *
ngIf=
"formErrors.cache.captions.size" class=
"form-error">{{ formErrors.cache.captions.size }}
</div>
289 <div i18n
class=
"inner-form-title">Customizations
</div>
291 <ng-container formGroupName=
"instance">
292 <ng-container formGroupName=
"customizations">
293 <div class=
"form-group">
294 <label i18n
for=
"customizationJavascript">JavaScript
</label>
296 helpType=
"custom" i18n-customHtml
297 customHtml=
"Write directly JavaScript code.<br />Example: <pre>console.log('my instance is amazing');</pre>"
300 id=
"customizationJavascript" formControlName=
"javascript"
301 [ngClass]=
"{ 'input-error': formErrors['instance.customizations.javascript'] }"
303 <div *
ngIf=
"formErrors.instance.customizations.javascript" class=
"form-error">{{ formErrors.instance.customizations.javascript }}
</div>
306 <div class=
"form-group">
307 <label for=
"customizationCSS">CSS
</label>
312 Write directly CSS code. Example:<br />
315 background-color: red;
319 Prepend with <em>#custom-css</em> to override styles. Example:
321 #custom-css .logged-in-email {{ '{' }}
328 id=
"customizationCSS" formControlName=
"css"
329 [ngClass]=
"{ 'input-error': formErrors['instance.customizations.css'] }"
331 <div *
ngIf=
"formErrors.instance.customizations.css" class=
"form-error">{{ formErrors.instance.customizations.css }}
</div>
340 <input (click)=
"formValidated()" type=
"submit" i18n-value
value=
"Update configuration" [disabled]=
"!form.valid">
341 <span class=
"form-error" i18n *
ngIf=
"!form.valid">It seems the configuration is invalid. Please search potential errors in the different tabs.
</span>