1 <form role=
"form" [formGroup]=
"form">
3 <tabset class=
"root-tabset bootstrap">
5 <tab i18n-heading
heading=
"Basic configuration">
7 <div i18n
class=
"inner-form-title">Instance
</div>
9 <div class=
"form-group">
10 <label i18n
for=
"instanceName">Name
</label>
12 type=
"text" id=
"instanceName"
13 formControlName=
"instanceName" [ngClass]=
"{ 'input-error': formErrors['instanceName'] }"
15 <div *
ngIf=
"formErrors.instanceName" class=
"form-error">
16 {{ formErrors.instanceName }}
20 <div class=
"form-group">
21 <label i18n
for=
"instanceShortDescription">Short description
</label>
23 id=
"instanceShortDescription" formControlName=
"instanceShortDescription"
24 [ngClass]=
"{ 'input-error': formErrors['instanceShortDescription'] }"
26 <div *
ngIf=
"formErrors.instanceShortDescription" class=
"form-error">
27 {{ formErrors.instanceShortDescription }}
31 <div class=
"form-group">
32 <label i18n
for=
"instanceDescription">Description
</label><my-help helpType=
"markdownText"></my-help>
34 id=
"instanceDescription" formControlName=
"instanceDescription" textareaWidth=
"500px" [previewColumn]=
"true"
35 [classes]=
"{ 'input-error': formErrors['instanceDescription'] }"
36 ></my-markdown-textarea>
37 <div *
ngIf=
"formErrors.instanceDescription" class=
"form-error">
38 {{ formErrors.instanceDescription }}
42 <div class=
"form-group">
43 <label i18n
for=
"instanceTerms">Terms
</label><my-help helpType=
"markdownText"></my-help>
45 id=
"instanceTerms" formControlName=
"instanceTerms" textareaWidth=
"500px" [previewColumn]=
"true"
46 [ngClass]=
"{ 'input-error': formErrors['instanceTerms'] }"
47 ></my-markdown-textarea>
48 <div *
ngIf=
"formErrors.instanceTerms" class=
"form-error">
49 {{ formErrors.instanceTerms }}
53 <div class=
"form-group">
54 <label i18n
for=
"instanceDefaultClientRoute">Default client route
</label>
55 <div class=
"peertube-select-container">
56 <select id=
"instanceDefaultClientRoute" formControlName=
"instanceDefaultClientRoute">
57 <option i18n
value=
"/videos/trending">Videos Trending
</option>
58 <option i18n
value=
"/videos/recently-added">Videos Recently Added
</option>
59 <option i18n
value=
"/videos/local">Local videos
</option>
62 <div *
ngIf=
"formErrors.instanceDefaultClientRoute" class=
"form-error">
63 {{ formErrors.instanceDefaultClientRoute }}
67 <div class=
"form-group">
68 <label i18n
for=
"instanceDefaultNSFWPolicy">Policy on videos containing sensitive content
</label>
70 helpType=
"custom" i18n-customHtml
71 customHtml=
"With <strong>Do not list</strong> or <strong>Blur thumbnails</strong>, a confirmation will be requested to watch the video."
74 <div class=
"peertube-select-container">
75 <select id=
"instanceDefaultNSFWPolicy" formControlName=
"instanceDefaultNSFWPolicy">
76 <option i18n
value=
"do_not_list">Do not list
</option>
77 <option i18n
value=
"blur">Blur thumbnails
</option>
78 <option i18n
value=
"display">Display
</option>
81 <div *
ngIf=
"formErrors.instanceDefaultNSFWPolicy" class=
"form-error">
82 {{ formErrors.instanceDefaultNSFWPolicy }}
86 <div i18n
class=
"inner-form-title">Signup
</div>
89 inputName=
"signupEnabled" formControlName=
"signupEnabled"
90 i18n-labelText
labelText=
"Signup enabled"
91 ></my-peertube-checkbox>
93 <div *
ngIf=
"isSignupEnabled()" class=
"form-group">
94 <label i18n
for=
"signupLimit">Signup limit
</label>
96 type=
"text" id=
"signupLimit"
97 formControlName=
"signupLimit" [ngClass]=
"{ 'input-error': formErrors['signupLimit'] }"
99 <div *
ngIf=
"formErrors.signupLimit" class=
"form-error">
100 {{ formErrors.signupLimit }}
104 <div i18n
class=
"inner-form-title">Import
</div>
106 <my-peertube-checkbox
107 inputName=
"importVideosHttpEnabled" formControlName=
"importVideosHttpEnabled"
108 i18n-labelText
labelText=
"Video import with HTTP enabled"
109 ></my-peertube-checkbox>
111 <my-peertube-checkbox
112 inputName=
"importVideosTorrentEnabled" formControlName=
"importVideosTorrentEnabled"
113 i18n-labelText
labelText=
"Video import with a torrent file or a magnet URI enabled"
114 ></my-peertube-checkbox>
116 <div i18n
class=
"inner-form-title">Administrator
</div>
118 <div class=
"form-group">
119 <label i18n
for=
"adminEmail">Admin email
</label>
121 type=
"text" id=
"adminEmail"
122 formControlName=
"adminEmail" [ngClass]=
"{ 'input-error': formErrors['adminEmail'] }"
124 <div *
ngIf=
"formErrors.adminEmail" class=
"form-error">
125 {{ formErrors.adminEmail }}
129 <div i18n
class=
"inner-form-title">Users
</div>
131 <div class=
"form-group">
132 <label i18n
for=
"userVideoQuota">User default video quota
</label>
133 <div class=
"peertube-select-container">
134 <select id=
"userVideoQuota" formControlName=
"userVideoQuota">
135 <option *
ngFor=
"let videoQuotaOption of videoQuotaOptions" [value]=
"videoQuotaOption.value">
136 {{ videoQuotaOption.label }}
140 <div *
ngIf=
"formErrors.userVideoQuota" class=
"form-error">
141 {{ formErrors.userVideoQuota }}
146 <tab i18n-heading
heading=
"Services">
148 <div i18n
class=
"inner-form-title">Twitter
</div>
150 <div class=
"form-group">
151 <label i18n
for=
"signupLimit">Your Twitter username
</label>
153 helpType=
"custom" i18n-customHtml
154 customHtml=
"Indicates the Twitter account for the website or platform on which the content was published."
157 type=
"text" id=
"servicesTwitterUsername"
158 formControlName=
"servicesTwitterUsername" [ngClass]=
"{ 'input-error': formErrors['servicesTwitterUsername'] }"
160 <div *
ngIf=
"formErrors.servicesTwitterUsername" class=
"form-error">
161 {{ formErrors.servicesTwitterUsername }}
165 <my-peertube-checkbox
166 inputName=
"servicesTwitterWhitelisted" formControlName=
"servicesTwitterWhitelisted"
167 i18n-labelText
labelText=
"Instance whitelisted by Twitter"
168 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 />
169 If the instance is not whitelisted, we use an image link card that will redirect on your PeerTube instance.<br /><br />
170 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."
171 ></my-peertube-checkbox>
174 <tab i18n-heading
heading=
"Advanced configuration">
176 <div i18n
class=
"inner-form-title">Transcoding
</div>
178 <my-peertube-checkbox
179 inputName=
"transcodingEnabled" formControlName=
"transcodingEnabled"
180 i18n-labelText
labelText=
"Transcoding enabled"
181 i18n-helpHtml
helpHtml=
"If you disable transcoding, many videos from your users will not work!"
182 ></my-peertube-checkbox>
184 <ng-template [ngIf]=
"isTranscodingEnabled()">
186 <div class=
"form-group">
187 <label i18n
for=
"transcodingThreads">Transcoding threads
</label>
188 <div class=
"peertube-select-container">
189 <select id=
"transcodingThreads" formControlName=
"transcodingThreads">
190 <option *
ngFor=
"let transcodingThreadOption of transcodingThreadOptions" [value]=
"transcodingThreadOption.value">
191 {{ transcodingThreadOption.label }}
195 <div *
ngIf=
"formErrors.transcodingThreads" class=
"form-error">
196 {{ formErrors.transcodingThreads }}
200 <div class=
"form-group" *
ngFor=
"let resolution of resolutions">
201 <my-peertube-checkbox
202 [inputName]=
"getResolutionKey(resolution)" [formControlName]=
"getResolutionKey(resolution)"
203 i18n-labelText
labelText=
"Resolution {{resolution}} enabled"
204 ></my-peertube-checkbox>
209 <div i18n
class=
"inner-form-title">
213 helpType=
"custom" i18n-customHtml
214 customHtml=
"Some files are not federated (previews, captions). We fetch them directly from the origin instance and cache them."
218 <div class=
"form-group">
219 <label i18n
for=
"cachePreviewsSize">Previews cache size
</label>
221 type=
"text" id=
"cachePreviewsSize"
222 formControlName=
"cachePreviewsSize" [ngClass]=
"{ 'input-error': formErrors['cachePreviewsSize'] }"
224 <div *
ngIf=
"formErrors.cachePreviewsSize" class=
"form-error">
225 {{ formErrors.cachePreviewsSize }}
229 <div class=
"form-group">
230 <label i18n
for=
"cachePreviewsSize">Video captions cache size
</label>
232 type=
"text" id=
"cacheCaptionsSize"
233 formControlName=
"cacheCaptionsSize" [ngClass]=
"{ 'input-error': formErrors['cacheCaptionsSize'] }"
235 <div *
ngIf=
"formErrors.cacheCaptionsSize" class=
"form-error">
236 {{ formErrors.cacheCaptionsSize }}
240 <div i18n
class=
"inner-form-title">Customizations
</div>
242 <div class=
"form-group">
243 <label i18n
for=
"customizationJavascript">JavaScript
</label>
245 helpType=
"custom" i18n-customHtml
246 customHtml=
"Write directly JavaScript code.<br />Example: <pre>console.log('my instance is amazing');</pre>"
249 id=
"customizationJavascript" formControlName=
"customizationJavascript"
250 [ngClass]=
"{ 'input-error': formErrors['customizationJavascript'] }"
252 <div *
ngIf=
"formErrors.customizationJavascript" class=
"form-error">
253 {{ formErrors.customizationJavascript }}
257 <div class=
"form-group">
258 <label for=
"customizationCSS">CSS
</label>
263 Write directly CSS code. Example:<br />
266 background-color: red;
270 Prepend with <em>#custom-css</em> to override styles. Example:
272 #custom-css .logged-in-email {{ '{' }}
279 id=
"customizationCSS" formControlName=
"customizationCSS"
280 [ngClass]=
"{ 'input-error': formErrors['customizationCSS'] }"
282 <div *
ngIf=
"formErrors.customizationCSS" class=
"form-error">
283 {{ formErrors.customizationCSS }}
289 <input (click)=
"formValidated()" type=
"submit" i18n-value
value=
"Update configuration" [disabled]=
"!form.valid">
290 <span class=
"form-error" i18n *
ngIf=
"!form.valid">It seems the configuration is invalid. Please search potential errors in the different tabs.
</span>