1 <form role=
"form" [formGroup]=
"form">
3 <tabset class=
"root-tabset bootstrap">
5 <tab heading=
"Basic configuration">
7 <div class=
"inner-form-title">Instance
</div>
9 <div class=
"form-group">
10 <label 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 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 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 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 for=
"instanceDefaultClientRoute">Default client route
</label>
55 <div class=
"peertube-select-container">
56 <select id=
"instanceDefaultClientRoute" formControlName=
"instanceDefaultClientRoute">
57 <option value=
"/videos/trending">Videos Trending
</option>
58 <option value=
"/videos/recently-added">Videos Recently Added
</option>
59 <option value=
"/videos/local">Local videos
</option>
62 <div *
ngIf=
"formErrors.instanceDefaultClientRoute" class=
"form-error">
63 {{ formErrors.instanceDefaultClientRoute }}
67 <div class=
"form-group">
68 <label for=
"instanceDefaultNSFWPolicy">Policy on videos containing sensitive content
</label>
69 <my-help helpType=
"custom" customHtml=
"With <strong>Do not list</strong> or <strong>Blur thumbnails</strong>, a confirmation will be requested to watch the video."></my-help>
71 <div class=
"peertube-select-container">
72 <select id=
"instanceDefaultNSFWPolicy" formControlName=
"instanceDefaultNSFWPolicy">
73 <option value=
"do_not_list">Do not list
</option>
74 <option value=
"blur">Blur thumbnails
</option>
75 <option value=
"display">Display
</option>
78 <div *
ngIf=
"formErrors.instanceDefaultNSFWPolicy" class=
"form-error">
79 {{ formErrors.instanceDefaultNSFWPolicy }}
83 <div class=
"inner-form-title">Signup
</div>
85 <div class=
"form-group">
86 <input type=
"checkbox" id=
"signupEnabled" formControlName=
"signupEnabled">
88 <label for=
"signupEnabled"></label>
89 <label for=
"signupEnabled">Signup enabled
</label>
92 <div *
ngIf=
"isSignupEnabled()" class=
"form-group">
93 <label for=
"signupLimit">Signup limit
</label>
95 type=
"text" id=
"signupLimit"
96 formControlName=
"signupLimit" [ngClass]=
"{ 'input-error': formErrors['signupLimit'] }"
98 <div *
ngIf=
"formErrors.signupLimit" class=
"form-error">
99 {{ formErrors.signupLimit }}
103 <div class=
"inner-form-title">Administrator
</div>
105 <div class=
"form-group">
106 <label for=
"adminEmail">Admin email
</label>
108 type=
"text" id=
"adminEmail"
109 formControlName=
"adminEmail" [ngClass]=
"{ 'input-error': formErrors['adminEmail'] }"
111 <div *
ngIf=
"formErrors.adminEmail" class=
"form-error">
112 {{ formErrors.adminEmail }}
116 <div class=
"inner-form-title">Users
</div>
118 <div class=
"form-group">
119 <label for=
"userVideoQuota">User default video quota
</label>
120 <div class=
"peertube-select-container">
121 <select id=
"userVideoQuota" formControlName=
"userVideoQuota">
122 <option *
ngFor=
"let videoQuotaOption of videoQuotaOptions" [value]=
"videoQuotaOption.value">
123 {{ videoQuotaOption.label }}
127 <div *
ngIf=
"formErrors.userVideoQuota" class=
"form-error">
128 {{ formErrors.userVideoQuota }}
133 <tab heading=
"Services">
135 <div class=
"inner-form-title">Twitter
</div>
137 <div class=
"form-group">
138 <label for=
"signupLimit">Your Twitter username
</label>
139 <my-help helpType=
"custom" customHtml=
"Indicates the Twitter account for the website or platform on which the content was published."></my-help>
141 type=
"text" id=
"servicesTwitterUsername"
142 formControlName=
"servicesTwitterUsername" [ngClass]=
"{ 'input-error': formErrors['servicesTwitterUsername'] }"
144 <div *
ngIf=
"formErrors.servicesTwitterUsername" class=
"form-error">
145 {{ formErrors.servicesTwitterUsername }}
149 <div class=
"form-group">
150 <input type=
"checkbox" id=
"servicesTwitterWhitelisted" formControlName=
"servicesTwitterWhitelisted">
152 <label for=
"servicesTwitterWhitelisted"></label>
153 <label for=
"servicesTwitterWhitelisted">Instance whitelisted by Twitter
</label>
154 <my-help helpType=
"custom" customHtml=
"If your instance is whitelisted by Twitter, a video player will be embedded in the Twitter feed on PeerTube video share.<br />
155 If the instance is not whitelisted, we use an image link card that will redirect on your PeerTube instance.<br /><br />
156 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."></my-help>
161 <tab heading=
"Advanced configuration">
163 <div class=
"inner-form-title">Transcoding
</div>
165 <div class=
"form-group">
166 <input type=
"checkbox" id=
"transcodingEnabled" formControlName=
"transcodingEnabled">
168 <label for=
"transcodingEnabled"></label>
169 <label for=
"transcodingEnabled">Transcoding enabled
</label>
172 <ng-template [ngIf]=
"isTranscodingEnabled()">
174 <div class=
"form-group">
175 <label for=
"transcodingThreads">Transcoding threads
</label>
176 <div class=
"peertube-select-container">
177 <select id=
"transcodingThreads" formControlName=
"transcodingThreads">
178 <option *
ngFor=
"let transcodingThreadOption of transcodingThreadOptions" [value]=
"transcodingThreadOption.value">
179 {{ transcodingThreadOption.label }}
183 <div *
ngIf=
"formErrors.transcodingThreads" class=
"form-error">
184 {{ formErrors.transcodingThreads }}
188 <div class=
"form-group" *
ngFor=
"let resolution of resolutions">
190 type=
"checkbox" [id]=
"getResolutionKey(resolution)"
191 [formControlName]=
"getResolutionKey(resolution)"
193 <label [for]=
"getResolutionKey(resolution)"></label>
194 <label [for]=
"getResolutionKey(resolution)">Resolution {{ resolution }} enabled
</label>
198 <div class=
"inner-form-title">Cache
</div>
200 <div class=
"form-group">
201 <label for=
"cachePreviewsSize">Preview cache size
</label>
202 <my-help helpType=
"custom" customHtml=
"Previews are not federated. We fetch them directly from the origin instance and cache them."></my-help>
205 type=
"text" id=
"cachePreviewsSize"
206 formControlName=
"cachePreviewsSize" [ngClass]=
"{ 'input-error': formErrors['cachePreviewsSize'] }"
208 <div *
ngIf=
"formErrors.cachePreviewsSize" class=
"form-error">
209 {{ formErrors.cachePreviewsSize }}
213 <div class=
"inner-form-title">Customizations
</div>
215 <div class=
"form-group">
216 <label for=
"customizationJavascript">JavaScript
</label>
217 <my-help helpType=
"custom" customHtml=
"Write directly JavaScript code.<br />Example: <pre>console.log('my instance is amazing');</pre>"></my-help>
219 id=
"customizationJavascript" formControlName=
"customizationJavascript"
220 [ngClass]=
"{ 'input-error': formErrors['customizationJavascript'] }"
222 <div *
ngIf=
"formErrors.customizationJavascript" class=
"form-error">
223 {{ formErrors.customizationJavascript }}
227 <div class=
"form-group">
228 <label for=
"customizationCSS">CSS
</label>
232 Write directly CSS code. Example:<br />
235 background-color: red;
239 Prepend with <em>#custom-css</em> to override styles. Example:
241 #custom-css .logged-in-email {
248 id=
"customizationCSS" formControlName=
"customizationCSS"
249 [ngClass]=
"{ 'input-error': formErrors['customizationCSS'] }"
251 <div *
ngIf=
"formErrors.customizationCSS" class=
"form-error">
252 {{ formErrors.customizationCSS }}
258 <input (click)=
"formValidated()" type=
"submit" value=
"Update configuration" [disabled]=
"!form.valid">