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 <div class=
"form-group">
11 <label i18n
for=
"instanceName">Name
</label>
13 type=
"text" id=
"instanceName"
14 formControlName=
"instanceName" [ngClass]=
"{ 'input-error': formErrors['instanceName'] }"
16 <div *
ngIf=
"formErrors.instanceName" class=
"form-error">
17 {{ formErrors.instanceName }}
21 <div class=
"form-group">
22 <label i18n
for=
"instanceShortDescription">Short description
</label>
24 id=
"instanceShortDescription" formControlName=
"instanceShortDescription"
25 [ngClass]=
"{ 'input-error': formErrors['instanceShortDescription'] }"
27 <div *
ngIf=
"formErrors.instanceShortDescription" class=
"form-error">
28 {{ formErrors.instanceShortDescription }}
32 <div class=
"form-group">
33 <label i18n
for=
"instanceDescription">Description
</label><my-help helpType=
"markdownText"></my-help>
35 id=
"instanceDescription" formControlName=
"instanceDescription" textareaWidth=
"500px" [previewColumn]=
"true"
36 [classes]=
"{ 'input-error': formErrors['instanceDescription'] }"
37 ></my-markdown-textarea>
38 <div *
ngIf=
"formErrors.instanceDescription" class=
"form-error">
39 {{ formErrors.instanceDescription }}
43 <div class=
"form-group">
44 <label i18n
for=
"instanceTerms">Terms
</label><my-help helpType=
"markdownText"></my-help>
46 id=
"instanceTerms" formControlName=
"instanceTerms" textareaWidth=
"500px" [previewColumn]=
"true"
47 [ngClass]=
"{ 'input-error': formErrors['instanceTerms'] }"
48 ></my-markdown-textarea>
49 <div *
ngIf=
"formErrors.instanceTerms" class=
"form-error">
50 {{ formErrors.instanceTerms }}
54 <div class=
"form-group">
55 <label i18n
for=
"instanceDefaultClientRoute">Default client route
</label>
56 <div class=
"peertube-select-container">
57 <select id=
"instanceDefaultClientRoute" formControlName=
"instanceDefaultClientRoute">
58 <option i18n
value=
"/videos/overview">Videos Overview
</option>
59 <option i18n
value=
"/videos/trending">Videos Trending
</option>
60 <option i18n
value=
"/videos/recently-added">Videos Recently Added
</option>
61 <option i18n
value=
"/videos/local">Local videos
</option>
64 <div *
ngIf=
"formErrors.instanceDefaultClientRoute" class=
"form-error">
65 {{ formErrors.instanceDefaultClientRoute }}
69 <div class=
"form-group">
70 <label i18n
for=
"instanceDefaultNSFWPolicy">Policy on videos containing sensitive content
</label>
72 helpType=
"custom" i18n-customHtml
73 customHtml=
"With <strong>Do not list</strong> or <strong>Blur thumbnails</strong>, a confirmation will be requested to watch the video."
76 <div class=
"peertube-select-container">
77 <select id=
"instanceDefaultNSFWPolicy" formControlName=
"instanceDefaultNSFWPolicy">
78 <option i18n
value=
"do_not_list">Do not list
</option>
79 <option i18n
value=
"blur">Blur thumbnails
</option>
80 <option i18n
value=
"display">Display
</option>
83 <div *
ngIf=
"formErrors.instanceDefaultNSFWPolicy" class=
"form-error">
84 {{ formErrors.instanceDefaultNSFWPolicy }}
88 <div i18n
class=
"inner-form-title">Signup
</div>
90 <div class=
"form-group">
92 inputName=
"signupEnabled" formControlName=
"signupEnabled"
93 i18n-labelText
labelText=
"Signup enabled"
94 ></my-peertube-checkbox>
97 <div class=
"form-group">
98 <my-peertube-checkbox *
ngIf=
"isSignupEnabled()"
99 inputName=
"signupRequiresEmailVerification" formControlName=
"signupRequiresEmailVerification"
100 i18n-labelText
labelText=
"Signup requires email verification"
101 ></my-peertube-checkbox>
104 <div *
ngIf=
"isSignupEnabled()" class=
"form-group">
105 <label i18n
for=
"signupLimit">Signup limit
</label>
107 type=
"text" id=
"signupLimit"
108 formControlName=
"signupLimit" [ngClass]=
"{ 'input-error': formErrors['signupLimit'] }"
110 <div *
ngIf=
"formErrors.signupLimit" class=
"form-error">
111 {{ formErrors.signupLimit }}
115 <div i18n
class=
"inner-form-title">Import
</div>
117 <div class=
"form-group">
118 <my-peertube-checkbox
119 inputName=
"importVideosHttpEnabled" formControlName=
"importVideosHttpEnabled"
120 i18n-labelText
labelText=
"Video import with HTTP URL (i.e. YouTube) enabled"
121 ></my-peertube-checkbox>
124 <div class=
"form-group">
125 <my-peertube-checkbox
126 inputName=
"importVideosTorrentEnabled" formControlName=
"importVideosTorrentEnabled"
127 i18n-labelText
labelText=
"Video import with a torrent file or a magnet URI enabled"
128 ></my-peertube-checkbox>
131 <div i18n
class=
"inner-form-title">Administrator
</div>
133 <div class=
"form-group">
134 <label i18n
for=
"adminEmail">Admin email
</label>
136 type=
"text" id=
"adminEmail"
137 formControlName=
"adminEmail" [ngClass]=
"{ 'input-error': formErrors['adminEmail'] }"
139 <div *
ngIf=
"formErrors.adminEmail" class=
"form-error">
140 {{ formErrors.adminEmail }}
144 <div i18n
class=
"inner-form-title">Users
</div>
146 <div class=
"form-group">
147 <label i18n
for=
"userVideoQuota">User default video quota
</label>
148 <div class=
"peertube-select-container">
149 <select id=
"userVideoQuota" formControlName=
"userVideoQuota">
150 <option *
ngFor=
"let videoQuotaOption of videoQuotaOptions" [value]=
"videoQuotaOption.value">
151 {{ videoQuotaOption.label }}
155 <div *
ngIf=
"formErrors.userVideoQuota" class=
"form-error">
156 {{ formErrors.userVideoQuota }}
160 <div class=
"form-group">
161 <label i18n
for=
"userVideoQuotaDaily">User default daily upload limit
</label>
162 <div class=
"peertube-select-container">
163 <select id=
"userVideoQuotaDaily" formControlName=
"userVideoQuotaDaily">
164 <option *
ngFor=
"let videoQuotaDailyOption of videoQuotaDailyOptions" [value]=
"videoQuotaDailyOption.value">
165 {{ videoQuotaDailyOption.label }}
169 <div *
ngIf=
"formErrors.userVideoQuotaDaily" class=
"form-error">
170 {{ formErrors.userVideoQuotaDaily }}
176 <ngb-tab i18n-title
title=
"Services">
177 <ng-template ngbTabContent
>
178 <div i18n
class=
"inner-form-title">Twitter
</div>
180 <div class=
"form-group">
181 <label i18n
for=
"signupLimit">Your Twitter username
</label>
183 helpType=
"custom" i18n-customHtml
184 customHtml=
"Indicates the Twitter account for the website or platform on which the content was published."
187 type=
"text" id=
"servicesTwitterUsername"
188 formControlName=
"servicesTwitterUsername" [ngClass]=
"{ 'input-error': formErrors['servicesTwitterUsername'] }"
190 <div *
ngIf=
"formErrors.servicesTwitterUsername" class=
"form-error">
191 {{ formErrors.servicesTwitterUsername }}
195 <div class=
"form-group">
196 <my-peertube-checkbox
197 inputName=
"servicesTwitterWhitelisted" formControlName=
"servicesTwitterWhitelisted"
198 i18n-labelText
labelText=
"Instance whitelisted by Twitter"
199 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 />
200 If the instance is not whitelisted, we use an image link card that will redirect on your PeerTube instance.<br /><br />
201 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."
202 ></my-peertube-checkbox>
207 <ngb-tab i18n-title
title=
"Advanced configuration">
208 <ng-template ngbTabContent
>
210 <div i18n
class=
"inner-form-title">Transcoding
</div>
212 <div class=
"form-group">
213 <my-peertube-checkbox
214 inputName=
"transcodingEnabled" formControlName=
"transcodingEnabled"
215 i18n-labelText
labelText=
"Transcoding enabled"
216 i18n-helpHtml
helpHtml=
"If you disable transcoding, many videos from your users will not work!"
217 ></my-peertube-checkbox>
220 <ng-template [ngIf]=
"isTranscodingEnabled()">
222 <div class=
"form-group">
223 <my-peertube-checkbox
224 inputName=
"transcodingAllowAdditionalExtensions" formControlName=
"transcodingAllowAdditionalExtensions"
225 i18n-labelText
labelText=
"Allow additional extensions"
226 i18n-helpHtml
helpHtml=
"Allow your users to upload .mkv, .mov, .avi, .flv videos"
227 ></my-peertube-checkbox>
230 <div class=
"form-group">
231 <label i18n
for=
"transcodingThreads">Transcoding threads
</label>
232 <div class=
"peertube-select-container">
233 <select id=
"transcodingThreads" formControlName=
"transcodingThreads">
234 <option *
ngFor=
"let transcodingThreadOption of transcodingThreadOptions" [value]=
"transcodingThreadOption.value">
235 {{ transcodingThreadOption.label }}
239 <div *
ngIf=
"formErrors.transcodingThreads" class=
"form-error">
240 {{ formErrors.transcodingThreads }}
244 <div class=
"form-group" *
ngFor=
"let resolution of resolutions">
245 <my-peertube-checkbox
246 [inputName]=
"getResolutionKey(resolution)" [formControlName]=
"getResolutionKey(resolution)"
247 i18n-labelText
labelText=
"Resolution {{resolution}} enabled"
248 ></my-peertube-checkbox>
252 <div i18n
class=
"inner-form-title">
256 helpType=
"custom" i18n-customHtml
257 customHtml=
"Some files are not federated (previews, captions). We fetch them directly from the origin instance and cache them."
261 <div class=
"form-group">
262 <label i18n
for=
"cachePreviewsSize">Previews cache size
</label>
264 type=
"text" id=
"cachePreviewsSize"
265 formControlName=
"cachePreviewsSize" [ngClass]=
"{ 'input-error': formErrors['cachePreviewsSize'] }"
267 <div *
ngIf=
"formErrors.cachePreviewsSize" class=
"form-error">
268 {{ formErrors.cachePreviewsSize }}
272 <div class=
"form-group">
273 <label i18n
for=
"cachePreviewsSize">Video captions cache size
</label>
275 type=
"text" id=
"cacheCaptionsSize"
276 formControlName=
"cacheCaptionsSize" [ngClass]=
"{ 'input-error': formErrors['cacheCaptionsSize'] }"
278 <div *
ngIf=
"formErrors.cacheCaptionsSize" class=
"form-error">
279 {{ formErrors.cacheCaptionsSize }}
283 <div i18n
class=
"inner-form-title">Customizations
</div>
285 <div class=
"form-group">
286 <label i18n
for=
"customizationJavascript">JavaScript
</label>
288 helpType=
"custom" i18n-customHtml
289 customHtml=
"Write directly JavaScript code.<br />Example: <pre>console.log('my instance is amazing');</pre>"
292 id=
"customizationJavascript" formControlName=
"customizationJavascript"
293 [ngClass]=
"{ 'input-error': formErrors['customizationJavascript'] }"
295 <div *
ngIf=
"formErrors.customizationJavascript" class=
"form-error">
296 {{ formErrors.customizationJavascript }}
300 <div class=
"form-group">
301 <label for=
"customizationCSS">CSS
</label>
306 Write directly CSS code. Example:<br />
309 background-color: red;
313 Prepend with <em>#custom-css</em> to override styles. Example:
315 #custom-css .logged-in-email {{ '{' }}
322 id=
"customizationCSS" formControlName=
"customizationCSS"
323 [ngClass]=
"{ 'input-error': formErrors['customizationCSS'] }"
325 <div *
ngIf=
"formErrors.customizationCSS" class=
"form-error">
326 {{ formErrors.customizationCSS }}
333 <input (click)=
"formValidated()" type=
"submit" i18n-value
value=
"Update configuration" [disabled]=
"!form.valid">
334 <span class=
"form-error" i18n *
ngIf=
"!form.valid">It seems the configuration is invalid. Please search potential errors in the different tabs.
</span>