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>
91 inputName=
"signupEnabled" formControlName=
"signupEnabled"
92 i18n-labelText
labelText=
"Signup enabled"
93 ></my-peertube-checkbox>
95 <my-peertube-checkbox *
ngIf=
"isSignupEnabled()"
96 inputName=
"signupRequiresEmailVerification" formControlName=
"signupRequiresEmailVerification"
97 i18n-labelText
labelText=
"Signup requires email verification"
98 ></my-peertube-checkbox>
100 <div *
ngIf=
"isSignupEnabled()" class=
"form-group">
101 <label i18n
for=
"signupLimit">Signup limit
</label>
103 type=
"text" id=
"signupLimit"
104 formControlName=
"signupLimit" [ngClass]=
"{ 'input-error': formErrors['signupLimit'] }"
106 <div *
ngIf=
"formErrors.signupLimit" class=
"form-error">
107 {{ formErrors.signupLimit }}
111 <div i18n
class=
"inner-form-title">Import
</div>
113 <my-peertube-checkbox
114 inputName=
"importVideosHttpEnabled" formControlName=
"importVideosHttpEnabled"
115 i18n-labelText
labelText=
"Video import with HTTP URL (i.e. YouTube) enabled"
116 ></my-peertube-checkbox>
118 <my-peertube-checkbox
119 inputName=
"importVideosTorrentEnabled" formControlName=
"importVideosTorrentEnabled"
120 i18n-labelText
labelText=
"Video import with a torrent file or a magnet URI enabled"
121 ></my-peertube-checkbox>
123 <div i18n
class=
"inner-form-title">Administrator
</div>
125 <div class=
"form-group">
126 <label i18n
for=
"adminEmail">Admin email
</label>
128 type=
"text" id=
"adminEmail"
129 formControlName=
"adminEmail" [ngClass]=
"{ 'input-error': formErrors['adminEmail'] }"
131 <div *
ngIf=
"formErrors.adminEmail" class=
"form-error">
132 {{ formErrors.adminEmail }}
136 <div i18n
class=
"inner-form-title">Users
</div>
138 <div class=
"form-group">
139 <label i18n
for=
"userVideoQuota">User default video quota
</label>
140 <div class=
"peertube-select-container">
141 <select id=
"userVideoQuota" formControlName=
"userVideoQuota">
142 <option *
ngFor=
"let videoQuotaOption of videoQuotaOptions" [value]=
"videoQuotaOption.value">
143 {{ videoQuotaOption.label }}
147 <div *
ngIf=
"formErrors.userVideoQuota" class=
"form-error">
148 {{ formErrors.userVideoQuota }}
152 <div class=
"form-group">
153 <label i18n
for=
"userVideoQuotaDaily">User default daily upload limit
</label>
154 <div class=
"peertube-select-container">
155 <select id=
"userVideoQuotaDaily" formControlName=
"userVideoQuotaDaily">
156 <option *
ngFor=
"let videoQuotaDailyOption of videoQuotaDailyOptions" [value]=
"videoQuotaDailyOption.value">
157 {{ videoQuotaDailyOption.label }}
161 <div *
ngIf=
"formErrors.userVideoQuotaDaily" class=
"form-error">
162 {{ formErrors.userVideoQuotaDaily }}
168 <ngb-tab i18n-title
title=
"Services">
169 <ng-template ngbTabContent
>
170 <div i18n
class=
"inner-form-title">Twitter
</div>
172 <div class=
"form-group">
173 <label i18n
for=
"signupLimit">Your Twitter username
</label>
175 helpType=
"custom" i18n-customHtml
176 customHtml=
"Indicates the Twitter account for the website or platform on which the content was published."
179 type=
"text" id=
"servicesTwitterUsername"
180 formControlName=
"servicesTwitterUsername" [ngClass]=
"{ 'input-error': formErrors['servicesTwitterUsername'] }"
182 <div *
ngIf=
"formErrors.servicesTwitterUsername" class=
"form-error">
183 {{ formErrors.servicesTwitterUsername }}
187 <my-peertube-checkbox
188 inputName=
"servicesTwitterWhitelisted" formControlName=
"servicesTwitterWhitelisted"
189 i18n-labelText
labelText=
"Instance whitelisted by Twitter"
190 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 />
191 If the instance is not whitelisted, we use an image link card that will redirect on your PeerTube instance.<br /><br />
192 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."
193 ></my-peertube-checkbox>
197 <ngb-tab i18n-title
title=
"Advanced configuration">
198 <ng-template ngbTabContent
>
200 <div i18n
class=
"inner-form-title">Transcoding
</div>
202 <my-peertube-checkbox
203 inputName=
"transcodingEnabled" formControlName=
"transcodingEnabled"
204 i18n-labelText
labelText=
"Transcoding enabled"
205 i18n-helpHtml
helpHtml=
"If you disable transcoding, many videos from your users will not work!"
206 ></my-peertube-checkbox>
208 <ng-template [ngIf]=
"isTranscodingEnabled()">
210 <div class=
"form-group">
211 <label i18n
for=
"transcodingThreads">Transcoding threads
</label>
212 <div class=
"peertube-select-container">
213 <select id=
"transcodingThreads" formControlName=
"transcodingThreads">
214 <option *
ngFor=
"let transcodingThreadOption of transcodingThreadOptions" [value]=
"transcodingThreadOption.value">
215 {{ transcodingThreadOption.label }}
219 <div *
ngIf=
"formErrors.transcodingThreads" class=
"form-error">
220 {{ formErrors.transcodingThreads }}
224 <div class=
"form-group" *
ngFor=
"let resolution of resolutions">
225 <my-peertube-checkbox
226 [inputName]=
"getResolutionKey(resolution)" [formControlName]=
"getResolutionKey(resolution)"
227 i18n-labelText
labelText=
"Resolution {{resolution}} enabled"
228 ></my-peertube-checkbox>
233 <div i18n
class=
"inner-form-title">
237 helpType=
"custom" i18n-customHtml
238 customHtml=
"Some files are not federated (previews, captions). We fetch them directly from the origin instance and cache them."
242 <div class=
"form-group">
243 <label i18n
for=
"cachePreviewsSize">Previews cache size
</label>
245 type=
"text" id=
"cachePreviewsSize"
246 formControlName=
"cachePreviewsSize" [ngClass]=
"{ 'input-error': formErrors['cachePreviewsSize'] }"
248 <div *
ngIf=
"formErrors.cachePreviewsSize" class=
"form-error">
249 {{ formErrors.cachePreviewsSize }}
253 <div class=
"form-group">
254 <label i18n
for=
"cachePreviewsSize">Video captions cache size
</label>
256 type=
"text" id=
"cacheCaptionsSize"
257 formControlName=
"cacheCaptionsSize" [ngClass]=
"{ 'input-error': formErrors['cacheCaptionsSize'] }"
259 <div *
ngIf=
"formErrors.cacheCaptionsSize" class=
"form-error">
260 {{ formErrors.cacheCaptionsSize }}
264 <div i18n
class=
"inner-form-title">Customizations
</div>
266 <div class=
"form-group">
267 <label i18n
for=
"customizationJavascript">JavaScript
</label>
269 helpType=
"custom" i18n-customHtml
270 customHtml=
"Write directly JavaScript code.<br />Example: <pre>console.log('my instance is amazing');</pre>"
273 id=
"customizationJavascript" formControlName=
"customizationJavascript"
274 [ngClass]=
"{ 'input-error': formErrors['customizationJavascript'] }"
276 <div *
ngIf=
"formErrors.customizationJavascript" class=
"form-error">
277 {{ formErrors.customizationJavascript }}
281 <div class=
"form-group">
282 <label for=
"customizationCSS">CSS
</label>
287 Write directly CSS code. Example:<br />
290 background-color: red;
294 Prepend with <em>#custom-css</em> to override styles. Example:
296 #custom-css .logged-in-email {{ '{' }}
303 id=
"customizationCSS" formControlName=
"customizationCSS"
304 [ngClass]=
"{ 'input-error': formErrors['customizationCSS'] }"
306 <div *
ngIf=
"formErrors.customizationCSS" class=
"form-error">
307 {{ formErrors.customizationCSS }}
314 <input (click)=
"formValidated()" type=
"submit" i18n-value
value=
"Update configuration" [disabled]=
"!form.valid">
315 <span class=
"form-error" i18n *
ngIf=
"!form.valid">It seems the configuration is invalid. Please search potential errors in the different tabs.
</span>