]>
Commit | Line | Data |
---|---|---|
5f46d28c C |
1 | <ng-container [formGroup]="form"> |
2 | <div class="form-row mt-5"> <!-- appearance grid --> | |
3 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
4 | <div i18n class="inner-form-title">APPEARANCE</div> | |
5 | <div i18n class="inner-form-description"> | |
6 | Use <a routerLink="/admin/plugins">plugins & themes</a> for more involved changes, or <a routerLink="/admin/config/edit-custom" fragment="advanced-configuration">add slight customizations</a>. | |
7 | </div> | |
8 | </div> | |
9 | ||
10 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> | |
11 | ||
12 | <ng-container formGroupName="theme"> | |
13 | <div class="form-group"> | |
14 | <label i18n for="themeDefault">Theme</label> | |
15 | ||
16 | <div class="peertube-select-container"> | |
17 | <select formControlName="default" id="themeDefault" class="form-control"> | |
18 | <option i18n value="default">default</option> | |
19 | ||
20 | <option *ngFor="let theme of getAvailableThemes()" [value]="theme">{{ theme }}</option> | |
21 | </select> | |
22 | </div> | |
23 | </div> | |
24 | </ng-container> | |
25 | ||
26 | <div class="form-group" formGroupName="instance"> | |
27 | <label i18n for="instanceDefaultClientRoute">Landing page</label> | |
70e33515 | 28 | |
2539932e C |
29 | <my-select-custom-value |
30 | id="instanceDefaultClientRoute" | |
31 | [items]="defaultLandingPageOptions" | |
32 | formControlName="defaultClientRoute" | |
33 | inputType="text" | |
34 | [clearable]="false" | |
35 | ></my-select-custom-value> | |
70e33515 | 36 | |
5f46d28c C |
37 | <div *ngIf="formErrors.instance.defaultClientRoute" class="form-error">{{ formErrors.instance.defaultClientRoute }}</div> |
38 | </div> | |
39 | ||
40 | <div class="form-group" formGroupName="trending"> | |
41 | <ng-container formGroupName="videos"> | |
42 | <ng-container formGroupName="algorithms"> | |
43 | <label i18n for="trendingVideosAlgorithmsDefault">Default trending page</label> | |
70e33515 | 44 | |
5f46d28c C |
45 | <div class="peertube-select-container"> |
46 | <select id="trendingVideosAlgorithmsDefault" formControlName="default" class="form-control"> | |
47 | <option i18n value="best">Best videos</option> | |
48 | <option i18n value="hot">Hot videos</option> | |
49 | <option i18n value="most-viewed">Most viewed videos</option> | |
50 | <option i18n value="most-liked">Most liked videos</option> | |
51 | </select> | |
52 | </div> | |
70e33515 | 53 | |
5f46d28c C |
54 | <div *ngIf="formErrors.trending.videos.algorithms.default" class="form-error">{{ formErrors.trending.videos.algorithms.default }}</div> |
55 | </ng-container> | |
56 | </ng-container> | |
57 | </div> | |
58 | ||
59 | </div> | |
60 | </div> | |
61 | ||
62 | <div class="form-row mt-4"> <!-- broadcast grid --> | |
63 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
64 | <div i18n class="inner-form-title">BROADCAST MESSAGE</div> | |
65 | <div i18n class="inner-for-description"> | |
66 | Display a message on your instance | |
67 | </div> | |
68 | </div> | |
69 | ||
70 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> | |
71 | ||
72 | <ng-container formGroupName="broadcastMessage"> | |
73 | ||
74 | <div class="form-group"> | |
75 | <my-peertube-checkbox | |
76 | inputName="broadcastMessageEnabled" formControlName="enabled" | |
77 | i18n-labelText labelText="Enable broadcast message" | |
78 | ></my-peertube-checkbox> | |
79 | </div> | |
80 | ||
81 | <div class="form-group"> | |
82 | <my-peertube-checkbox | |
83 | inputName="broadcastMessageDismissable" formControlName="dismissable" | |
84 | i18n-labelText labelText="Allow users to dismiss the broadcast message " | |
85 | ></my-peertube-checkbox> | |
86 | </div> | |
87 | ||
88 | <div class="form-group"> | |
89 | <label i18n for="broadcastMessageLevel">Broadcast message level</label> | |
70e33515 | 90 | |
5f46d28c C |
91 | <div class="peertube-select-container"> |
92 | <select id="broadcastMessageLevel" formControlName="level" class="form-control"> | |
93 | <option value="info">info</option> | |
2c2631e4 | 94 | <option value="warning">warning</option> |
5f46d28c C |
95 | <option value="error">error</option> |
96 | </select> | |
97 | </div> | |
70e33515 | 98 | |
5f46d28c C |
99 | <div *ngIf="formErrors.broadcastMessage.level" class="form-error">{{ formErrors.broadcastMessage.level }}</div> |
100 | </div> | |
101 | ||
102 | <div class="form-group"> | |
103 | <label i18n for="broadcastMessageMessage">Message</label><my-help helpType="markdownText"></my-help> | |
70e33515 | 104 | |
5f46d28c C |
105 | <my-markdown-textarea |
106 | name="broadcastMessageMessage" formControlName="message" textareaMaxWidth="500px" | |
107 | [classes]="{ 'input-error': formErrors['broadcastMessage.message'] }" | |
108 | ></my-markdown-textarea> | |
70e33515 | 109 | |
5f46d28c C |
110 | <div *ngIf="formErrors.broadcastMessage.message" class="form-error">{{ formErrors.broadcastMessage.message }}</div> |
111 | </div> | |
112 | ||
113 | </ng-container> | |
114 | ||
115 | </div> | |
116 | </div> | |
117 | ||
118 | <div class="form-row mt-4"> <!-- new users grid --> | |
119 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
120 | <div i18n class="inner-form-title">NEW USERS</div> | |
121 | <div i18n class="inner-for-description"> | |
122 | Manage <a routerLink="/admin/users">users</a> to set their quota individually. | |
123 | </div> | |
124 | </div> | |
125 | ||
126 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> | |
127 | ||
128 | <ng-container formGroupName="signup"> | |
129 | <div class="form-group"> | |
130 | <my-peertube-checkbox | |
131 | inputName="signupEnabled" formControlName="enabled" | |
132 | i18n-labelText labelText="Enable Signup" | |
133 | > | |
134 | <ng-container ngProjectAs="description"> | |
135 | <span i18n>⚠️ This functionality requires a lot of attention and extra moderation.</span> | |
136 | ||
137 | <div class="alert alert-info alert-signup" *ngIf="signupAlertMessage">{{ signupAlertMessage }}</div> | |
138 | </ng-container> | |
139 | ||
140 | <ng-container ngProjectAs="extra"> | |
70e33515 | 141 | <my-peertube-checkbox [ngClass]="getDisabledSignupClass()" |
5f46d28c C |
142 | inputName="signupRequiresEmailVerification" formControlName="requiresEmailVerification" |
143 | i18n-labelText labelText="Signup requires email verification" | |
144 | ></my-peertube-checkbox> | |
145 | ||
70e33515 | 146 | <div [ngClass]="getDisabledSignupClass()" class="mt-3"> |
5f46d28c | 147 | <label i18n for="signupLimit">Signup limit</label> |
70e33515 | 148 | |
5f46d28c C |
149 | <div class="number-with-unit"> |
150 | <input | |
151 | type="number" min="-1" id="signupLimit" class="form-control" | |
152 | formControlName="limit" [ngClass]="{ 'input-error': formErrors['signup.limit'] }" | |
153 | > | |
154 | <span i18n>{form.value['signup']['limit'], plural, =1 {user} other {users}}</span> | |
155 | </div> | |
70e33515 | 156 | |
5f46d28c | 157 | <div *ngIf="formErrors.signup.limit" class="form-error">{{ formErrors.signup.limit }}</div> |
70e33515 C |
158 | |
159 | <small i18n *ngIf="hasUnlimitedSignup()" class="text-muted">Signup won't be limited to a fixed number of users.</small> | |
5f46d28c C |
160 | </div> |
161 | </ng-container> | |
162 | </my-peertube-checkbox> | |
163 | </div> | |
164 | </ng-container> | |
165 | ||
166 | <ng-container formGroupName="user"> | |
167 | <div class="form-group"> | |
168 | <label i18n for="userVideoQuota">Default video quota per user</label> | |
169 | ||
170 | <my-select-custom-value | |
171 | id="userVideoQuota" | |
172 | [items]="getVideoQuotaOptions()" | |
173 | formControlName="videoQuota" | |
174 | i18n-inputSuffix inputSuffix="bytes" inputType="number" | |
175 | [clearable]="false" | |
176 | ></my-select-custom-value> | |
177 | ||
178 | <div *ngIf="formErrors.user.videoQuota" class="form-error">{{ formErrors.user.videoQuota }}</div> | |
179 | </div> | |
180 | ||
181 | <div class="form-group"> | |
182 | <label i18n for="userVideoQuotaDaily">Default daily upload limit per user</label> | |
183 | ||
184 | <my-select-custom-value | |
185 | id="userVideoQuotaDaily" | |
186 | [items]="getVideoQuotaDailyOptions()" | |
187 | formControlName="videoQuotaDaily" | |
188 | i18n-inputSuffix inputSuffix="bytes" inputType="number" | |
189 | [clearable]="false" | |
190 | ></my-select-custom-value> | |
191 | ||
192 | <div *ngIf="formErrors.user.videoQuotaDaily" class="form-error">{{ formErrors.user.videoQuotaDaily }}</div> | |
193 | </div> | |
194 | </ng-container> | |
195 | ||
196 | </div> | |
197 | </div> | |
198 | ||
199 | <div class="form-row mt-4"> <!-- videos grid --> | |
200 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
201 | <div i18n class="inner-form-title">VIDEOS</div> | |
202 | </div> | |
203 | ||
204 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> | |
205 | ||
206 | <ng-container formGroupName="import"> | |
207 | ||
208 | <ng-container formGroupName="videos"> | |
209 | ||
210 | <div class="form-group mt-4"> | |
211 | <label i18n for="importConcurrency">Import jobs concurrency</label> | |
70e33515 | 212 | <span i18n class="text-muted ml-1">allows to import multiple videos in parallel. ⚠️ Requires a PeerTube restart.</span> |
5f46d28c C |
213 | |
214 | <div class="number-with-unit"> | |
215 | <input type="number" name="importConcurrency" formControlName="concurrency" /> | |
216 | <span i18n>jobs in parallel</span> | |
217 | </div> | |
218 | ||
219 | <div *ngIf="formErrors.import.concurrency" class="form-error">{{ formErrors.import.concurrency }}</div> | |
220 | </div> | |
221 | ||
222 | <div class="form-group" formGroupName="http"> | |
223 | <my-peertube-checkbox | |
224 | inputName="importVideosHttpEnabled" formControlName="enabled" | |
225 | i18n-labelText labelText="Allow import with HTTP URL (e.g. YouTube)" | |
226 | ></my-peertube-checkbox> | |
227 | </div> | |
228 | ||
229 | <div class="form-group" formGroupName="torrent"> | |
230 | <my-peertube-checkbox | |
231 | inputName="importVideosTorrentEnabled" formControlName="enabled" | |
232 | i18n-labelText labelText="Allow import with a torrent file or a magnet URI" | |
233 | ></my-peertube-checkbox> | |
234 | </div> | |
235 | ||
236 | </ng-container> | |
237 | </ng-container> | |
238 | ||
239 | <ng-container formGroupName="autoBlacklist"> | |
240 | <ng-container formGroupName="videos"> | |
241 | <ng-container formGroupName="ofUsers"> | |
242 | ||
243 | <div class="form-group"> | |
244 | <my-peertube-checkbox | |
245 | inputName="autoBlacklistVideosOfUsersEnabled" formControlName="enabled" | |
246 | i18n-labelText labelText="Block new videos automatically" | |
247 | > | |
248 | <ng-container ngProjectAs="description"> | |
249 | <span i18n>Unless a user is marked as trusted, their videos will stay private until a moderator reviews them.</span> | |
250 | </ng-container> | |
251 | </my-peertube-checkbox> | |
252 | </div> | |
253 | ||
254 | </ng-container> | |
255 | </ng-container> | |
256 | </ng-container> | |
257 | ||
258 | </div> | |
259 | </div> | |
260 | ||
261 | <div class="form-row mt-4"> <!-- search grid --> | |
262 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
263 | <div i18n class="inner-form-title">SEARCH</div> | |
264 | </div> | |
265 | ||
266 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> | |
267 | ||
268 | <ng-container formGroupName="search"> | |
269 | <ng-container formGroupName="remoteUri"> | |
270 | ||
271 | <div class="form-group"> | |
272 | <my-peertube-checkbox | |
273 | inputName="searchRemoteUriUsers" formControlName="users" | |
274 | i18n-labelText labelText="Allow users to do remote URI/handle search" | |
275 | > | |
276 | <ng-container ngProjectAs="description"> | |
277 | <span i18n>Allow <strong>your users</strong> to look up remote videos/actors that may not be federated with your instance</span> | |
278 | </ng-container> | |
279 | </my-peertube-checkbox> | |
280 | </div> | |
281 | ||
282 | <div class="form-group"> | |
283 | <my-peertube-checkbox | |
284 | inputName="searchRemoteUriAnonymous" formControlName="anonymous" | |
285 | i18n-labelText labelText="Allow anonymous to do remote URI/handle search" | |
286 | > | |
287 | <ng-container ngProjectAs="description"> | |
288 | <span i18n>Allow <strong>anonymous users</strong> to look up remote videos/actors that may not be federated with your instance</span> | |
289 | </ng-container> | |
290 | </my-peertube-checkbox> | |
291 | </div> | |
292 | ||
293 | </ng-container> | |
294 | ||
295 | <ng-container formGroupName="searchIndex"> | |
296 | <div class="form-group"> | |
297 | <my-peertube-checkbox | |
298 | inputName="searchIndexEnabled" formControlName="enabled" | |
299 | i18n-labelText labelText="Enable global search" | |
300 | > | |
301 | <ng-container ngProjectAs="description"> | |
302 | <p i18n>⚠️ This functionality depends heavily on the moderation of instances followed by the search index you select.</p> | |
303 | ||
304 | <span i18n> | |
305 | You should only use moderated search indexes in production, or <a href="https://framagit.org/framasoft/peertube/search-index">host your own</a>. | |
306 | </span> | |
307 | </ng-container> | |
308 | ||
309 | <ng-container ngProjectAs="extra"> | |
70e33515 | 310 | <div [ngClass]="getDisabledSearchIndexClass()"> |
5f46d28c | 311 | <label i18n for="searchIndexUrl">Search index URL</label> |
70e33515 | 312 | |
5f46d28c C |
313 | <input |
314 | type="text" id="searchIndexUrl" class="form-control" | |
315 | formControlName="url" [ngClass]="{ 'input-error': formErrors['search.searchIndex.url'] }" | |
316 | > | |
70e33515 | 317 | |
5f46d28c C |
318 | <div *ngIf="formErrors.search.searchIndex.url" class="form-error">{{ formErrors.search.searchIndex.url }}</div> |
319 | </div> | |
320 | ||
321 | <div class="mt-3"> | |
70e33515 | 322 | <my-peertube-checkbox [ngClass]="getDisabledSearchIndexClass()" |
5f46d28c C |
323 | inputName="searchIndexDisableLocalSearch" formControlName="disableLocalSearch" |
324 | i18n-labelText labelText="Disable local search in search bar" | |
325 | ></my-peertube-checkbox> | |
326 | </div> | |
327 | ||
328 | <div class="mt-3"> | |
70e33515 | 329 | <my-peertube-checkbox [ngClass]="getDisabledSearchIndexClass()" |
5f46d28c C |
330 | inputName="searchIndexIsDefaultSearch" formControlName="isDefaultSearch" |
331 | i18n-labelText labelText="Search bar uses the global search index by default" | |
332 | > | |
333 | <ng-container ngProjectAs="description"> | |
334 | <span i18n>Otherwise the local search stays used by default</span> | |
335 | </ng-container> | |
336 | </my-peertube-checkbox> | |
337 | </div> | |
338 | ||
339 | </ng-container> | |
340 | </my-peertube-checkbox> | |
341 | </div> | |
342 | ||
343 | </ng-container> | |
344 | ||
345 | </ng-container> | |
346 | ||
347 | </div> | |
348 | </div> | |
349 | ||
350 | <div class="form-row mt-4"> <!-- federation grid --> | |
351 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
352 | <div i18n class="inner-form-title">FEDERATION</div> | |
353 | <div i18n class="inner-form-description"> | |
354 | Manage <a routerLink="/admin/follows">relations</a> with other instances. | |
355 | </div> | |
356 | </div> | |
357 | ||
358 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> | |
359 | ||
360 | <ng-container formGroupName="followers"> | |
361 | <ng-container formGroupName="instance"> | |
362 | ||
363 | <div class="form-group"> | |
364 | <my-peertube-checkbox | |
365 | inputName="followersInstanceEnabled" formControlName="enabled" | |
366 | i18n-labelText labelText="Other instances can follow yours" | |
367 | ></my-peertube-checkbox> | |
368 | </div> | |
369 | ||
370 | <div class="form-group"> | |
371 | <my-peertube-checkbox | |
372 | inputName="followersInstanceManualApproval" formControlName="manualApproval" | |
373 | i18n-labelText labelText="Manually approve new instance followers" | |
374 | ></my-peertube-checkbox> | |
375 | </div> | |
376 | </ng-container> | |
377 | </ng-container> | |
378 | ||
379 | <ng-container formGroupName="followings"> | |
380 | <ng-container formGroupName="instance"> | |
381 | ||
382 | <ng-container formGroupName="autoFollowBack"> | |
383 | <div class="form-group"> | |
384 | <my-peertube-checkbox | |
385 | inputName="followingsInstanceAutoFollowBackEnabled" formControlName="enabled" | |
386 | i18n-labelText labelText="Automatically follow back instances" | |
387 | > | |
388 | <ng-container ngProjectAs="description"> | |
389 | <span i18n>⚠️ This functionality requires a lot of attention and extra moderation.</span> | |
390 | </ng-container> | |
391 | </my-peertube-checkbox> | |
392 | </div> | |
393 | </ng-container> | |
394 | ||
395 | <ng-container formGroupName="autoFollowIndex"> | |
396 | <div class="form-group"> | |
397 | <my-peertube-checkbox | |
398 | inputName="followingsInstanceAutoFollowIndexEnabled" formControlName="enabled" | |
399 | i18n-labelText labelText="Automatically follow instances of a public index" | |
400 | > | |
401 | <ng-container ngProjectAs="description"> | |
402 | <p i18n>⚠️ This functionality requires a lot of attention and extra moderation.</p> | |
403 | ||
404 | <span i18n> | |
0dbc6c14 | 405 | See <a href="https://docs.joinpeertube.org/admin-following-instances?id=automatically-follow-other-instances" rel="noopener noreferer" target="_blank">the documentation</a> for more information about the expected URL |
5f46d28c C |
406 | </span> |
407 | </ng-container> | |
408 | ||
409 | <ng-container ngProjectAs="extra"> | |
410 | <div [ngClass]="{ 'disabled-checkbox-extra': !isAutoFollowIndexEnabled() }"> | |
411 | <label i18n for="followingsInstanceAutoFollowIndexUrl">Index URL</label> | |
412 | <input | |
413 | type="text" id="followingsInstanceAutoFollowIndexUrl" class="form-control" | |
414 | formControlName="indexUrl" [ngClass]="{ 'input-error': formErrors['followings.instance.autoFollowIndex.indexUrl'] }" | |
415 | > | |
416 | <div *ngIf="formErrors.followings.instance.autoFollowIndex.indexUrl" class="form-error">{{ formErrors.followings.instance.autoFollowIndex.indexUrl }}</div> | |
417 | </div> | |
418 | </ng-container> | |
419 | </my-peertube-checkbox> | |
420 | </div> | |
421 | ||
422 | </ng-container> | |
423 | </ng-container> | |
424 | </ng-container> | |
425 | ||
426 | </div> | |
427 | </div> | |
428 | ||
429 | <div class="form-row mt-4"> <!-- administrators grid --> | |
430 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
431 | <div i18n class="inner-form-title">ADMINISTRATORS</div> | |
432 | </div> | |
433 | ||
434 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> | |
435 | ||
436 | <div class="form-group" formGroupName="admin"> | |
437 | <label i18n for="adminEmail">Admin email</label> | |
70e33515 | 438 | |
5f46d28c C |
439 | <input |
440 | type="text" id="adminEmail" class="form-control" | |
441 | formControlName="email" [ngClass]="{ 'input-error': formErrors['admin.email'] }" | |
442 | > | |
70e33515 | 443 | |
5f46d28c C |
444 | <div *ngIf="formErrors.admin.email" class="form-error">{{ formErrors.admin.email }}</div> |
445 | </div> | |
446 | ||
447 | <div class="form-group" formGroupName="contactForm"> | |
448 | <my-peertube-checkbox | |
449 | inputName="enableContactForm" formControlName="enabled" | |
450 | i18n-labelText labelText="Enable contact form" | |
451 | ></my-peertube-checkbox> | |
452 | </div> | |
453 | ||
454 | </div> | |
455 | </div> | |
456 | ||
457 | <div class="form-row mt-4"> <!-- Twitter grid --> | |
458 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
459 | <div i18n class="inner-form-title">TWITTER</div> | |
460 | <div i18n class="inner-form-description"> | |
461 | Provide the Twitter account representing your instance to improve link previews. | |
462 | If you don't have a Twitter account, just leave the default value. | |
463 | </div> | |
464 | </div> | |
465 | ||
466 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> | |
467 | ||
468 | <ng-container formGroupName="services"> | |
469 | <ng-container formGroupName="twitter"> | |
470 | ||
471 | <div class="form-group"> | |
472 | <label i18n for="signupLimit">Your Twitter username</label> | |
473 | ||
474 | <input | |
475 | type="text" id="servicesTwitterUsername" class="form-control" | |
476 | formControlName="username" [ngClass]="{ 'input-error': formErrors['services.twitter.username'] }" | |
477 | > | |
70e33515 | 478 | |
5f46d28c C |
479 | <div *ngIf="formErrors.services.twitter.username" class="form-error">{{ formErrors.services.twitter.username }}</div> |
480 | </div> | |
481 | ||
482 | <div class="form-group"> | |
483 | <my-peertube-checkbox inputName="servicesTwitterWhitelisted" formControlName="whitelisted"> | |
484 | <ng-template ptTemplate="label"> | |
485 | <ng-container i18n>Instance allowed by Twitter</ng-container> | |
486 | </ng-template> | |
487 | ||
488 | <ng-template ptTemplate="help"> | |
489 | <ng-container i18n> | |
490 | If your instance is explicitly allowed by Twitter, a video player will be embedded in the Twitter feed on PeerTube video share.<br /> | |
491 | If the instance is not, we use an image link card that will redirect to your PeerTube instance.<br /><br /> | |
a1eda903 | 492 | Check this checkbox, save the configuration and test with a video URL of your instance (https://example.com/w/blabla) on |
5f46d28c C |
493 | <a target='_blank' rel='noopener noreferrer' href='https://cards-dev.twitter.com/validator'>https://cards-dev.twitter.com/validator</a> |
494 | to see if you instance is allowed. | |
495 | </ng-container> | |
496 | </ng-template> | |
497 | </my-peertube-checkbox> | |
498 | </div> | |
499 | ||
500 | </ng-container> | |
501 | </ng-container> | |
502 | ||
503 | </div> | |
504 | </div> | |
505 | </ng-container> |