]>
Commit | Line | Data |
---|---|---|
c9e3565d | 1 | <h1 class="sr-only" i18n>Configuration</h1> |
8a8e02a4 | 2 | <form role="form" [formGroup]="form"> |
fd206f0b | 3 | |
45c6bcf3 | 4 | <div ngbNav #nav="ngbNav" class="nav-tabs"> |
8be1afa1 | 5 | |
45c6bcf3 C |
6 | <ng-container ngbNavItem="instance-information"> |
7 | <a ngbNavLink i18n>Instance information</a> | |
8 | ||
9 | <ng-template ngbNavContent> | |
8be1afa1 | 10 | |
3866f1a0 | 11 | <ng-container formGroupName="instance"> |
ccc00cb2 | 12 | |
482fa503 RK |
13 | <div class="form-row mt-5"> <!-- instance grid --> |
14 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
15 | <div i18n class="inner-form-title">INSTANCE</div> | |
16 | </div> | |
63347a0f | 17 | |
482fa503 | 18 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> |
63347a0f | 19 | |
482fa503 RK |
20 | <div class="form-group"> |
21 | <label i18n for="instanceName">Name</label> | |
22 | <input | |
a6d5ff76 | 23 | type="text" id="instanceName" class="form-control" |
482fa503 RK |
24 | formControlName="name" [ngClass]="{ 'input-error': formErrors.instance.name }" |
25 | > | |
26 | <div *ngIf="formErrors.instance.name" class="form-error">{{ formErrors.instance.name }}</div> | |
27 | </div> | |
63347a0f | 28 | |
482fa503 RK |
29 | <div class="form-group"> |
30 | <label i18n for="instanceShortDescription">Short description</label> | |
31 | <textarea | |
a6d5ff76 | 32 | id="instanceShortDescription" formControlName="shortDescription" class="form-control small" |
482fa503 RK |
33 | [ngClass]="{ 'input-error': formErrors['instance.shortDescription'] }" |
34 | ></textarea> | |
35 | <div *ngIf="formErrors.instance.shortDescription" class="form-error">{{ formErrors.instance.shortDescription }}</div> | |
36 | </div> | |
ccc00cb2 | 37 | |
482fa503 RK |
38 | <div class="form-group"> |
39 | <label i18n for="instanceDescription">Description</label><my-help helpType="markdownText"></my-help> | |
40 | <my-markdown-textarea | |
b15fe00f | 41 | name="instanceDescription" formControlName="description" textareaMaxWidth="500px" |
482fa503 RK |
42 | [classes]="{ 'input-error': formErrors['instance.description'] }" |
43 | ></my-markdown-textarea> | |
44 | <div *ngIf="formErrors.instance.description" class="form-error">{{ formErrors.instance.description }}</div> | |
45 | </div> | |
ccc00cb2 | 46 | |
482fa503 RK |
47 | <div class="form-group"> |
48 | <label i18n for="instanceCategories">Main instance categories</label> | |
49 | ||
50 | <div> | |
52c4976f C |
51 | <my-select-checkbox |
52 | id="instanceCategories" | |
53 | formControlName="categories" [availableItems]="categoryItems" | |
54 | [selectableGroup]="false" | |
857961f0 | 55 | i18n-placeholder placeholder="Add a new category" |
52c4976f C |
56 | > |
57 | </my-select-checkbox> | |
482fa503 RK |
58 | </div> |
59 | </div> | |
60 | ||
61 | <div class="form-group"> | |
62 | <label i18n for="instanceLanguages">Main languages you/your moderators speak</label> | |
63 | ||
64 | <div> | |
52c4976f C |
65 | <my-select-checkbox |
66 | id="instanceLanguages" | |
67 | formControlName="languages" [availableItems]="languageItems" | |
68 | [selectableGroup]="false" | |
857961f0 | 69 | i18n-placeholder placeholder="Add a new language" |
52c4976f C |
70 | > |
71 | </my-select-checkbox> | |
482fa503 RK |
72 | </div> |
73 | </div> | |
ccc00cb2 | 74 | |
ccc00cb2 | 75 | </div> |
63347a0f | 76 | </div> |
63347a0f | 77 | |
482fa503 RK |
78 | <div class="form-row mt-4"> <!-- moderation & nsfw grid --> |
79 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
80 | <div i18n class="inner-form-title">MODERATION & NSFW</div> | |
310e95d8 RK |
81 | <div i18n class="inner-for-description"> |
82 | Manage <a routerLink="/admin/users">users</a> to build a moderation team. | |
83 | </div> | |
482fa503 | 84 | </div> |
ccc00cb2 | 85 | |
482fa503 | 86 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> |
421d935d | 87 | |
482fa503 RK |
88 | <div class="form-group"> |
89 | <my-peertube-checkbox inputName="instanceIsNSFW" formControlName="isNSFW"> | |
90 | <ng-template ptTemplate="label"> | |
91 | <ng-container i18n>This instance is dedicated to sensitive or NSFW content</ng-container> | |
92 | </ng-template> | |
f8802489 | 93 | |
482fa503 RK |
94 | <ng-template ptTemplate="help"> |
95 | <ng-container i18n> | |
96 | Enabling it will allow other administrators to know that you are mainly federating sensitive content.<br /><br /> | |
97 | Moreover, the NSFW checkbox on video upload will be automatically checked by default. | |
98 | </ng-container> | |
99 | </ng-template> | |
100 | </my-peertube-checkbox> | |
101 | </div> | |
421d935d | 102 | |
482fa503 RK |
103 | <div class="form-group"> |
104 | <label i18n for="instanceDefaultNSFWPolicy">Policy on videos containing sensitive content</label> | |
ccc00cb2 | 105 | |
482fa503 RK |
106 | <my-help> |
107 | <ng-template ptTemplate="customHtml"> | |
108 | <ng-container i18n> | |
109 | With <strong>Do not list</strong> or <strong>Blur thumbnails</strong>, a confirmation will be requested to watch the video. | |
110 | </ng-container> | |
111 | </ng-template> | |
112 | </my-help> | |
113 | ||
114 | <div class="peertube-select-container"> | |
a6d5ff76 | 115 | <select id="instanceDefaultNSFWPolicy" formControlName="defaultNSFWPolicy" class="form-control"> |
2bc9bd08 | 116 | <option i18n value="undefined" disabled>Policy for sensitive videos</option> |
482fa503 RK |
117 | <option i18n value="do_not_list">Do not list</option> |
118 | <option i18n value="blur">Blur thumbnails</option> | |
119 | <option i18n value="display">Display</option> | |
120 | </select> | |
121 | </div> | |
122 | <div *ngIf="formErrors.instance.defaultNSFWPolicy" class="form-error">{{ formErrors.instance.defaultNSFWPolicy }}</div> | |
123 | </div> | |
ccc00cb2 | 124 | |
482fa503 RK |
125 | <div class="form-group"> |
126 | <label i18n for="instanceTerms">Terms</label><my-help helpType="markdownText"></my-help> | |
127 | <my-markdown-textarea | |
b15fe00f | 128 | name="instanceTerms" formControlName="terms" textareaMaxWidth="500px" |
482fa503 RK |
129 | [ngClass]="{ 'input-error': formErrors['instance.terms'] }" |
130 | ></my-markdown-textarea> | |
131 | <div *ngIf="formErrors.instance.terms" class="form-error">{{ formErrors.instance.terms }}</div> | |
132 | </div> | |
ccc00cb2 | 133 | |
482fa503 RK |
134 | <div class="form-group"> |
135 | <label i18n for="instanceCodeOfConduct">Code of conduct</label><my-help helpType="markdownText"></my-help> | |
136 | <my-markdown-textarea | |
b15fe00f | 137 | name="instanceCodeOfConduct" formControlName="codeOfConduct" textareaMaxWidth="500px" |
482fa503 RK |
138 | [ngClass]="{ 'input-error': formErrors['instance.codeOfConduct'] }" |
139 | ></my-markdown-textarea> | |
140 | <div *ngIf="formErrors.instance.codeOfConduct" class="form-error">{{ formErrors.instance.codeOfConduct }}</div> | |
141 | </div> | |
ccc00cb2 | 142 | |
482fa503 RK |
143 | <div class="form-group"> |
144 | <label i18n for="instanceModerationInformation">Moderation information</label><my-help helpType="markdownText"></my-help> | |
145 | <div i18n class="label-small-info">Who moderates the instance? What is the policy regarding NSFW videos? Political videos? etc</div> | |
146 | ||
147 | <my-markdown-textarea | |
b15fe00f | 148 | name="instanceModerationInformation" formControlName="moderationInformation" textareaMaxWidth="500px" |
482fa503 RK |
149 | [ngClass]="{ 'input-error': formErrors['instance.moderationInformation'] }" |
150 | ></my-markdown-textarea> | |
151 | <div *ngIf="formErrors.instance.moderationInformation" class="form-error">{{ formErrors.instance.moderationInformation }}</div> | |
152 | </div> | |
153 | ||
154 | </div> | |
ccc00cb2 C |
155 | </div> |
156 | ||
482fa503 RK |
157 | <div class="form-row mt-4"> <!-- you and your instance grid --> |
158 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
159 | <div i18n class="inner-form-title">YOU AND YOUR INSTANCE</div> | |
160 | </div> | |
ccc00cb2 | 161 | |
482fa503 | 162 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> |
ccc00cb2 | 163 | |
482fa503 RK |
164 | <div class="form-group"> |
165 | <label i18n for="instanceAdministrator">Who is behind the instance?</label> | |
166 | <div i18n class="label-small-info">A single person? A non-profit? A company?</div> | |
8ae03c37 | 167 | |
482fa503 | 168 | <my-markdown-textarea |
b15fe00f | 169 | name="instanceAdministrator" formControlName="administrator" textareaMaxWidth="500px" textareaHeight="75px" |
482fa503 RK |
170 | [classes]="{ 'input-error': formErrors['instance.administrator'] }" |
171 | ></my-markdown-textarea> | |
8ae03c37 | 172 | |
482fa503 RK |
173 | <div *ngIf="formErrors.instance.administrator" class="form-error">{{ formErrors.instance.administrator }}</div> |
174 | </div> | |
8ae03c37 | 175 | |
482fa503 RK |
176 | <div class="form-group"> |
177 | <label i18n for="instanceCreationReason">Why did you create this instance?</label> | |
178 | <div i18n class="label-small-info">To share your personal videos? To open registrations and allow people to upload what they want?</div> | |
179 | ||
180 | <textarea | |
a6d5ff76 | 181 | id="instanceCreationReason" formControlName="creationReason" class="small" class="form-control" |
482fa503 RK |
182 | [ngClass]="{ 'input-error': formErrors['instance.creationReason'] }" |
183 | ></textarea> | |
184 | <div *ngIf="formErrors.instance.creationReason" class="form-error">{{ formErrors.instance.creationReason }}</div> | |
185 | </div> | |
ccc00cb2 | 186 | |
482fa503 RK |
187 | <div class="form-group"> |
188 | <label i18n for="instanceMaintenanceLifetime">How long do you plan to maintain this instance?</label> | |
189 | <div i18n class="label-small-info">It's important to know for users who want to register on your instance</div> | |
190 | ||
191 | <textarea | |
a6d5ff76 | 192 | id="instanceMaintenanceLifetime" formControlName="maintenanceLifetime" class="form-control small" |
482fa503 RK |
193 | [ngClass]="{ 'input-error': formErrors['instance.maintenanceLifetime'] }" |
194 | ></textarea> | |
195 | <div *ngIf="formErrors.instance.maintenanceLifetime" class="form-error">{{ formErrors.instance.maintenanceLifetime }}</div> | |
196 | </div> | |
197 | ||
198 | <div class="form-group"> | |
199 | <label i18n for="instanceBusinessModel">How will you finance the PeerTube server?</label> | |
200 | <div i18n class="label-small-info">With your own funds? With user donations? Advertising?</div> | |
201 | ||
202 | <textarea | |
a6d5ff76 | 203 | id="instanceBusinessModel" formControlName="businessModel" class="form-control small" |
482fa503 RK |
204 | [ngClass]="{ 'input-error': formErrors['instance.businessModel'] }" |
205 | ></textarea> | |
206 | <div *ngIf="formErrors.instance.businessModel" class="form-error">{{ formErrors.instance.businessModel }}</div> | |
207 | </div> | |
ccc00cb2 | 208 | |
482fa503 | 209 | </div> |
ccc00cb2 C |
210 | </div> |
211 | ||
482fa503 RK |
212 | <div class="form-row mt-4"> <!-- other information grid --> |
213 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
214 | <div i18n class="inner-form-title">OTHER INFORMATION</div> | |
215 | </div> | |
ccc00cb2 | 216 | |
482fa503 | 217 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> |
ccc00cb2 | 218 | |
482fa503 RK |
219 | <div class="form-group"> |
220 | <label i18n for="instanceHardwareInformation">What server/hardware does the instance run on?</label> | |
45e0d669 | 221 | <div i18n class="label-small-info">i.e. 2vCore 2GB RAM, a direct the link to the server you rent, etc.</div> |
be04c6fd | 222 | |
482fa503 | 223 | <my-markdown-textarea |
b15fe00f | 224 | name="instanceHardwareInformation" formControlName="hardwareInformation" textareaMaxWidth="500px" textareaHeight="75px" |
482fa503 RK |
225 | [classes]="{ 'input-error': formErrors['instance.hardwareInformation'] }" |
226 | ></my-markdown-textarea> | |
be04c6fd | 227 | |
482fa503 RK |
228 | <div *ngIf="formErrors.instance.hardwareInformation" class="form-error">{{ formErrors.instance.hardwareInformation }}</div> |
229 | </div> | |
be04c6fd | 230 | |
482fa503 | 231 | </div> |
be04c6fd C |
232 | </div> |
233 | ||
3866f1a0 | 234 | </ng-container> |
ccc00cb2 | 235 | </ng-template> |
45c6bcf3 C |
236 | </ng-container> |
237 | ||
238 | <ng-container ngbNavItem="basic-configuration"> | |
239 | <a ngbNavLink i18n>Basic configuration</a> | |
63347a0f | 240 | |
45c6bcf3 | 241 | <ng-template ngbNavContent> |
0dc64777 | 242 | |
482fa503 RK |
243 | <div class="form-row mt-5"> <!-- appearance grid --> |
244 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
245 | <div i18n class="inner-form-title">APPEARANCE</div> | |
310e95d8 | 246 | <div i18n class="inner-for-description"> |
45e0d669 | 247 | Use <a routerLink="/admin/plugins">plugins & themes</a> for more involved changes, or <a routerLink="/admin/config/edit-custom" fragment="customizations" (click)="gotoAnchor()">add slight customizations</a>. |
310e95d8 | 248 | </div> |
7cd4d2ba | 249 | </div> |
7cd4d2ba | 250 | |
482fa503 | 251 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> |
7cd4d2ba | 252 | |
482fa503 RK |
253 | <ng-container formGroupName="theme"> |
254 | <div class="form-group"> | |
255 | <label i18n for="themeDefault">Theme</label> | |
ccc00cb2 | 256 | |
482fa503 | 257 | <div class="peertube-select-container"> |
a6d5ff76 | 258 | <select formControlName="default" id="themeDefault" class="form-control"> |
482fa503 | 259 | <option i18n value="default">default</option> |
63347a0f | 260 | |
482fa503 RK |
261 | <option *ngFor="let theme of availableThemes" [value]="theme">{{ theme }}</option> |
262 | </select> | |
96a4a7c3 | 263 | </div> |
482fa503 RK |
264 | </div> |
265 | </ng-container> | |
63347a0f | 266 | |
482fa503 RK |
267 | <div class="form-group" formGroupName="instance"> |
268 | <label i18n for="instanceDefaultClientRoute">Landing page</label> | |
269 | <div class="peertube-select-container"> | |
a6d5ff76 | 270 | <select id="instanceDefaultClientRoute" formControlName="defaultClientRoute" class="form-control"> |
482fa503 RK |
271 | <option i18n value="/videos/overview">Discover videos</option> |
272 | <option i18n value="/videos/trending">Trending videos</option> | |
273 | <option i18n value="/videos/most-liked">Most liked videos</option> | |
274 | <option i18n value="/videos/recently-added">Recently added videos</option> | |
275 | <option i18n value="/videos/local">Local videos</option> | |
276 | </select> | |
277 | </div> | |
278 | <div *ngIf="formErrors.instance.defaultClientRoute" class="form-error">{{ formErrors.instance.defaultClientRoute }}</div> | |
3866f1a0 | 279 | </div> |
482fa503 | 280 | |
3866f1a0 | 281 | </div> |
482fa503 | 282 | </div> |
d9eaee39 | 283 | |
72c33e71 C |
284 | <div class="form-row mt-4"> <!-- broadcast grid --> |
285 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
286 | <div i18n class="inner-form-title">BROADCAST MESSAGE</div> | |
287 | <div i18n class="inner-for-description"> | |
288 | Display a message on your instance | |
289 | </div> | |
290 | </div> | |
291 | ||
292 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> | |
293 | ||
294 | <ng-container formGroupName="broadcastMessage"> | |
295 | ||
296 | <div class="form-group"> | |
297 | <my-peertube-checkbox | |
298 | inputName="broadcastMessageEnabled" formControlName="enabled" | |
299 | i18n-labelText labelText="Enable broadcast message" | |
300 | ></my-peertube-checkbox> | |
301 | </div> | |
302 | ||
303 | <div class="form-group"> | |
304 | <my-peertube-checkbox | |
305 | inputName="broadcastMessageDismissable" formControlName="dismissable" | |
306 | i18n-labelText labelText="Allow users to dismiss the broadcast message " | |
307 | ></my-peertube-checkbox> | |
308 | </div> | |
309 | ||
310 | <div class="form-group"> | |
311 | <label i18n for="broadcastMessageLevel">Broadcast message level</label> | |
312 | <div class="peertube-select-container"> | |
313 | <select id="broadcastMessageLevel" formControlName="level" class="form-control"> | |
314 | <option value="info">info</option> | |
315 | <option value="warning">warning</option> | |
316 | <option value="error">error</option> | |
317 | </select> | |
318 | </div> | |
319 | <div *ngIf="formErrors.broadcastMessage.level" class="form-error">{{ formErrors.broadcastMessage.level }}</div> | |
320 | </div> | |
321 | ||
322 | <div class="form-group"> | |
323 | <label i18n for="broadcastMessageMessage">Message</label><my-help helpType="markdownText"></my-help> | |
324 | <my-markdown-textarea | |
325 | name="broadcastMessageMessage" formControlName="message" textareaMaxWidth="500px" | |
326 | [classes]="{ 'input-error': formErrors['broadcastMessage.message'] }" | |
327 | ></my-markdown-textarea> | |
328 | <div *ngIf="formErrors.broadcastMessage.message" class="form-error">{{ formErrors.broadcastMessage.message }}</div> | |
329 | </div> | |
330 | ||
331 | </ng-container> | |
332 | ||
333 | </div> | |
334 | </div> | |
335 | ||
482fa503 RK |
336 | <div class="form-row mt-4"> <!-- new users grid --> |
337 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
338 | <div i18n class="inner-form-title">NEW USERS</div> | |
310e95d8 RK |
339 | <div i18n class="inner-for-description"> |
340 | Manage <a routerLink="/admin/users">users</a> to set their quota individually. | |
341 | </div> | |
63347a0f | 342 | </div> |
8be1afa1 | 343 | |
482fa503 | 344 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> |
0dc64777 | 345 | |
482fa503 RK |
346 | <ng-container formGroupName="signup"> |
347 | <div class="form-group"> | |
348 | <my-peertube-checkbox | |
349 | inputName="signupEnabled" formControlName="enabled" | |
d840487f | 350 | i18n-labelText labelText="Enable Signup" |
482fa503 RK |
351 | > |
352 | <ng-container ngProjectAs="description"> | |
353 | <span i18n>⚠️ This functionality requires a lot of attention and extra moderation.</span> | |
16a173bb C |
354 | |
355 | <div class="alert alert-info alert-signup" *ngIf="signupAlertMessage">{{ signupAlertMessage }}</div> | |
482fa503 RK |
356 | </ng-container> |
357 | <ng-container ngProjectAs="extra"> | |
358 | <my-peertube-checkbox [ngClass]="{ 'disabled-checkbox-extra': !isSignupEnabled() }" | |
359 | inputName="signupRequiresEmailVerification" formControlName="requiresEmailVerification" | |
360 | i18n-labelText labelText="Signup requires email verification" | |
361 | ></my-peertube-checkbox> | |
63347a0f | 362 | |
482fa503 RK |
363 | <div [ngClass]="{ 'disabled-checkbox-extra': !isSignupEnabled() }" class="mt-3"> |
364 | <label i18n for="signupLimit">Signup limit</label> | |
365 | <input | |
a6d5ff76 | 366 | type="number" min="-1" id="signupLimit" class="form-control" |
482fa503 RK |
367 | formControlName="limit" [ngClass]="{ 'input-error': formErrors['signup.limit'] }" |
368 | > | |
369 | <div *ngIf="formErrors.signup.limit" class="form-error">{{ formErrors.signup.limit }}</div> | |
370 | <small *ngIf="form.value['signup']['limit'] === -1" class="text-muted">Signup won't be limited to a fixed number of users.</small> | |
371 | </div> | |
372 | </ng-container> | |
373 | </my-peertube-checkbox> | |
374 | </div> | |
375 | </ng-container> | |
8be1afa1 | 376 | |
482fa503 RK |
377 | <ng-container formGroupName="user"> |
378 | <div class="form-group"> | |
379 | <label i18n for="userVideoQuota">Default video quota per user</label> | |
380 | <div class="peertube-select-container"> | |
a6d5ff76 | 381 | <select id="userVideoQuota" formControlName="videoQuota" class="form-control"> |
2bc9bd08 | 382 | <option *ngFor="let videoQuotaOption of videoQuotaOptions" [value]="videoQuotaOption.value" [disabled]="videoQuotaOption.disabled"> |
482fa503 RK |
383 | {{ videoQuotaOption.label }} |
384 | </option> | |
385 | </select> | |
386 | </div> | |
387 | <div *ngIf="formErrors.user.videoQuota" class="form-error">{{ formErrors.user.videoQuota }}</div> | |
388 | </div> | |
3866f1a0 | 389 | |
482fa503 RK |
390 | <div class="form-group"> |
391 | <label i18n for="userVideoQuotaDaily">Default daily upload limit per user</label> | |
392 | <div class="peertube-select-container"> | |
a6d5ff76 | 393 | <select id="userVideoQuotaDaily" formControlName="videoQuotaDaily" class="form-control"> |
2bc9bd08 | 394 | <option *ngFor="let videoQuotaDailyOption of videoQuotaDailyOptions" [value]="videoQuotaDailyOption.value" [disabled]="videoQuotaDailyOption.disabled"> |
482fa503 RK |
395 | {{ videoQuotaDailyOption.label }} |
396 | </option> | |
397 | </select> | |
398 | </div> | |
399 | <div *ngIf="formErrors.user.videoQuotaDaily" class="form-error">{{ formErrors.user.videoQuotaDaily }}</div> | |
400 | </div> | |
401 | </ng-container> | |
3866f1a0 | 402 | |
482fa503 RK |
403 | </div> |
404 | </div> | |
8be1afa1 | 405 | |
5fb2e288 | 406 | <div class="form-row mt-4"> <!-- videos grid --> |
482fa503 | 407 | <div class="form-group col-12 col-lg-4 col-xl-3"> |
5fb2e288 | 408 | <div i18n class="inner-form-title">VIDEOS</div> |
482fa503 | 409 | </div> |
0dc64777 | 410 | |
482fa503 | 411 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> |
7ccddd7b | 412 | |
482fa503 RK |
413 | <ng-container formGroupName="import"> |
414 | <ng-container formGroupName="videos"> | |
45c6bcf3 | 415 | |
482fa503 RK |
416 | <div class="form-group" formGroupName="http"> |
417 | <my-peertube-checkbox | |
418 | inputName="importVideosHttpEnabled" formControlName="enabled" | |
419 | i18n-labelText labelText="Allow import with HTTP URL (i.e. YouTube)" | |
420 | ></my-peertube-checkbox> | |
421 | </div> | |
7ccddd7b | 422 | |
482fa503 RK |
423 | <div class="form-group" formGroupName="torrent"> |
424 | <my-peertube-checkbox | |
425 | inputName="importVideosTorrentEnabled" formControlName="enabled" | |
426 | i18n-labelText labelText="Allow import with a torrent file or a magnet URI" | |
427 | ></my-peertube-checkbox> | |
428 | </div> | |
7ccddd7b | 429 | |
482fa503 | 430 | </ng-container> |
7ccddd7b | 431 | </ng-container> |
0dc64777 | 432 | |
482fa503 RK |
433 | <ng-container formGroupName="autoBlacklist"> |
434 | <ng-container formGroupName="videos"> | |
435 | <ng-container formGroupName="ofUsers"> | |
45c6bcf3 | 436 | |
482fa503 RK |
437 | <div class="form-group"> |
438 | <my-peertube-checkbox | |
439 | inputName="autoBlacklistVideosOfUsersEnabled" formControlName="enabled" | |
5baee5fc | 440 | i18n-labelText labelText="Block new videos automatically" |
482fa503 RK |
441 | > |
442 | <ng-container ngProjectAs="description"> | |
443 | <span i18n>Unless a user is marked as trusted, their videos will stay private until a moderator reviews them.</span> | |
444 | </ng-container> | |
445 | </my-peertube-checkbox> | |
446 | </div> | |
45c6bcf3 | 447 | |
482fa503 RK |
448 | </ng-container> |
449 | </ng-container> | |
450 | </ng-container> | |
0dc64777 | 451 | |
482fa503 RK |
452 | </div> |
453 | </div> | |
0dc64777 | 454 | |
5fb2e288 C |
455 | <div class="form-row mt-4"> <!-- search grid --> |
456 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
457 | <div i18n class="inner-form-title">SEARCH</div> | |
458 | </div> | |
459 | ||
460 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> | |
461 | ||
462 | <ng-container formGroupName="search"> | |
463 | <ng-container formGroupName="remoteUri"> | |
464 | ||
465 | <div class="form-group"> | |
466 | <my-peertube-checkbox | |
467 | inputName="searchRemoteUriUsers" formControlName="users" | |
468 | i18n-labelText labelText="Allow users to do remote URI/handle search" | |
469 | > | |
470 | <ng-container ngProjectAs="description"> | |
dc5bb5ce | 471 | <span i18n>Allow <strong>your users</strong> to look up remote videos/actors that may not be federated with your instance</span> |
5fb2e288 C |
472 | </ng-container> |
473 | </my-peertube-checkbox> | |
474 | </div> | |
475 | ||
476 | <div class="form-group"> | |
477 | <my-peertube-checkbox | |
478 | inputName="searchRemoteUriAnonymous" formControlName="anonymous" | |
479 | i18n-labelText labelText="Allow anonymous to do remote URI/handle search" | |
480 | > | |
481 | <ng-container ngProjectAs="description"> | |
dc5bb5ce | 482 | <span i18n>Allow <strong>anonymous users</strong> to look up remote videos/actors that may not be federated with your instance</span> |
5fb2e288 C |
483 | </ng-container> |
484 | </my-peertube-checkbox> | |
485 | </div> | |
486 | ||
487 | </ng-container> | |
488 | ||
489 | <ng-container formGroupName="searchIndex"> | |
490 | <div class="form-group"> | |
491 | <my-peertube-checkbox | |
492 | inputName="searchIndexEnabled" formControlName="enabled" | |
d840487f | 493 | i18n-labelText labelText="Enable global search" |
5fb2e288 | 494 | > |
d840487f RK |
495 | <ng-container ngProjectAs="description"> |
496 | <p i18n>⚠️ This functionality depends heavily on the moderation of instances followed by the search index you select.</p> | |
5fb2e288 | 497 | |
d840487f | 498 | <span i18n> |
7e4022a5 | 499 | You should only use moderated search indexes in production, or <a href="https://framagit.org/framasoft/peertube/search-index">host your own</a>. |
d840487f RK |
500 | </span> |
501 | </ng-container> | |
5fb2e288 | 502 | |
d840487f RK |
503 | <ng-container ngProjectAs="extra"> |
504 | <div [ngClass]="{ 'disabled-checkbox-extra': !isSearchIndexEnabled() }"> | |
505 | <label i18n for="searchIndexUrl">Search index URL</label> | |
506 | <input | |
507 | type="text" id="searchIndexUrl" class="form-control" | |
508 | formControlName="url" [ngClass]="{ 'input-error': formErrors['search.searchIndex.url'] }" | |
509 | > | |
510 | <div *ngIf="formErrors.search.searchIndex.url" class="form-error">{{ formErrors.search.searchIndex.url }}</div> | |
511 | </div> | |
512 | ||
513 | <div class="mt-3"> | |
514 | <my-peertube-checkbox [ngClass]="{ 'disabled-checkbox-extra': !isSearchIndexEnabled() }" | |
515 | inputName="searchIndexDisableLocalSearch" formControlName="disableLocalSearch" | |
516 | i18n-labelText labelText="Disable local search in search bar" | |
517 | ></my-peertube-checkbox> | |
518 | </div> | |
519 | ||
520 | <div class="mt-3"> | |
521 | <my-peertube-checkbox [ngClass]="{ 'disabled-checkbox-extra': !isSearchIndexEnabled() }" | |
522 | inputName="searchIndexIsDefaultSearch" formControlName="isDefaultSearch" | |
523 | i18n-labelText labelText="Search bar uses the global search index by default" | |
524 | > | |
525 | <ng-container ngProjectAs="description"> | |
526 | <span i18n>Otherwise the local search stays used by default</span> | |
527 | </ng-container> | |
528 | </my-peertube-checkbox> | |
529 | </div> | |
5fb2e288 | 530 | |
d840487f RK |
531 | </ng-container> |
532 | </my-peertube-checkbox> | |
5fb2e288 C |
533 | </div> |
534 | ||
535 | </ng-container> | |
536 | ||
537 | </ng-container> | |
538 | ||
539 | </div> | |
540 | </div> | |
541 | ||
482fa503 RK |
542 | <div class="form-row mt-4"> <!-- federation grid --> |
543 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
544 | <div i18n class="inner-form-title">FEDERATION</div> | |
45e0d669 RK |
545 | <div i18n class="inner-form-description"> |
546 | Manage <a routerLink="/admin/follows">relations</a> with other instances. | |
547 | </div> | |
482fa503 | 548 | </div> |
0dc64777 | 549 | |
482fa503 | 550 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> |
0dc64777 | 551 | |
482fa503 RK |
552 | <ng-container formGroupName="followers"> |
553 | <ng-container formGroupName="instance"> | |
e1b49ee5 | 554 | |
482fa503 RK |
555 | <div class="form-group"> |
556 | <my-peertube-checkbox | |
557 | inputName="followersInstanceEnabled" formControlName="enabled" | |
558 | i18n-labelText labelText="Other instances can follow yours" | |
559 | ></my-peertube-checkbox> | |
560 | </div> | |
e1b49ee5 | 561 | |
482fa503 RK |
562 | <div class="form-group"> |
563 | <my-peertube-checkbox | |
564 | inputName="followersInstanceManualApproval" formControlName="manualApproval" | |
565 | i18n-labelText labelText="Manually approve new instance followers" | |
566 | ></my-peertube-checkbox> | |
567 | </div> | |
568 | </ng-container> | |
e1b49ee5 C |
569 | </ng-container> |
570 | ||
482fa503 RK |
571 | <ng-container formGroupName="followings"> |
572 | <ng-container formGroupName="instance"> | |
573 | ||
574 | <ng-container formGroupName="autoFollowBack"> | |
575 | <div class="form-group"> | |
576 | <my-peertube-checkbox | |
577 | inputName="followingsInstanceAutoFollowBackEnabled" formControlName="enabled" | |
578 | i18n-labelText labelText="Automatically follow back instances" | |
579 | > | |
580 | <ng-container ngProjectAs="description"> | |
581 | <span i18n>⚠️ This functionality requires a lot of attention and extra moderation.</span> | |
582 | </ng-container> | |
583 | </my-peertube-checkbox> | |
584 | </div> | |
585 | </ng-container> | |
96a4a7c3 | 586 | |
482fa503 RK |
587 | <ng-container formGroupName="autoFollowIndex"> |
588 | <div class="form-group"> | |
589 | <my-peertube-checkbox | |
590 | inputName="followingsInstanceAutoFollowIndexEnabled" formControlName="enabled" | |
2bc9bd08 | 591 | i18n-labelText labelText="Automatically follow instances of a public index" |
482fa503 RK |
592 | > |
593 | <ng-container ngProjectAs="description"> | |
2bc9bd08 RK |
594 | <p i18n>⚠️ This functionality requires a lot of attention and extra moderation.</p> |
595 | ||
596 | <span i18n> | |
7e4022a5 | 597 | You should only follow moderated indexes in production, or <a href="https://framagit.org/framasoft/peertube/instances-peertube#peertube-auto-follow">host your own</a>. |
2bc9bd08 | 598 | </span> |
482fa503 RK |
599 | </ng-container> |
600 | ||
601 | <ng-container ngProjectAs="extra"> | |
602 | <div [ngClass]="{ 'disabled-checkbox-extra': !isAutoFollowIndexEnabled() }"> | |
603 | <label i18n for="followingsInstanceAutoFollowIndexUrl">Index URL</label> | |
604 | <input | |
a6d5ff76 | 605 | type="text" id="followingsInstanceAutoFollowIndexUrl" class="form-control" |
482fa503 RK |
606 | formControlName="indexUrl" [ngClass]="{ 'input-error': formErrors['followings.instance.autoFollowIndex.indexUrl'] }" |
607 | > | |
608 | <div *ngIf="formErrors.followings.instance.autoFollowIndex.indexUrl" class="form-error">{{ formErrors.followings.instance.autoFollowIndex.indexUrl }}</div> | |
609 | </div> | |
610 | </ng-container> | |
611 | </my-peertube-checkbox> | |
612 | </div> | |
e1b49ee5 | 613 | |
482fa503 RK |
614 | </ng-container> |
615 | </ng-container> | |
e1b49ee5 | 616 | </ng-container> |
e1b49ee5 | 617 | |
482fa503 RK |
618 | </div> |
619 | </div> | |
620 | ||
621 | <div class="form-row mt-4"> <!-- administrators grid --> | |
622 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
623 | <div i18n class="inner-form-title">ADMINISTRATORS</div> | |
624 | </div> | |
0dc64777 | 625 | |
482fa503 | 626 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> |
8be1afa1 | 627 | |
482fa503 RK |
628 | <div class="form-group" formGroupName="admin"> |
629 | <label i18n for="adminEmail">Admin email</label> | |
630 | <input | |
a6d5ff76 | 631 | type="text" id="adminEmail" class="form-control" |
482fa503 RK |
632 | formControlName="email" [ngClass]="{ 'input-error': formErrors['admin.email'] }" |
633 | > | |
634 | <div *ngIf="formErrors.admin.email" class="form-error">{{ formErrors.admin.email }}</div> | |
635 | </div> | |
636 | ||
637 | <div class="form-group" formGroupName="contactForm"> | |
638 | <my-peertube-checkbox | |
639 | inputName="enableContactForm" formControlName="enabled" | |
640 | i18n-labelText labelText="Enable contact form" | |
641 | ></my-peertube-checkbox> | |
642 | </div> | |
8be1afa1 | 643 | |
482fa503 | 644 | </div> |
8be1afa1 | 645 | </div> |
bee0abff | 646 | |
63347a0f | 647 | </ng-template> |
45c6bcf3 C |
648 | </ng-container> |
649 | ||
650 | <ng-container ngbNavItem="services"> | |
651 | <a ngbNavLink i18n>Services</a> | |
8be1afa1 | 652 | |
45c6bcf3 | 653 | <ng-template ngbNavContent> |
0f7fedc3 | 654 | |
482fa503 RK |
655 | <div class="form-row mt-5"> <!-- twitter grid --> |
656 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
657 | <div i18n class="inner-form-title">TWITTER</div> | |
9b307858 RK |
658 | <div i18n class="inner-form-description"> |
659 | Optional. If any, provide the Twitter account representing your instance to improve link previews. | |
660 | </div> | |
482fa503 | 661 | </div> |
3866f1a0 | 662 | |
482fa503 | 663 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> |
421d935d | 664 | |
482fa503 RK |
665 | <ng-container formGroupName="services"> |
666 | <ng-container formGroupName="twitter"> | |
421d935d | 667 | |
482fa503 RK |
668 | <div class="form-group"> |
669 | <label i18n for="signupLimit">Your Twitter username</label> | |
3866f1a0 | 670 | |
482fa503 | 671 | <input |
a6d5ff76 | 672 | type="text" id="servicesTwitterUsername" class="form-control" |
482fa503 RK |
673 | formControlName="username" [ngClass]="{ 'input-error': formErrors['services.twitter.username'] }" |
674 | > | |
675 | <div *ngIf="formErrors.services.twitter.username" class="form-error">{{ formErrors.services.twitter.username }}</div> | |
676 | </div> | |
3866f1a0 | 677 | |
482fa503 RK |
678 | <div class="form-group"> |
679 | <my-peertube-checkbox inputName="servicesTwitterWhitelisted" formControlName="whitelisted"> | |
680 | <ng-template ptTemplate="label"> | |
5baee5fc | 681 | <ng-container i18n>Instance allowed by Twitter</ng-container> |
482fa503 RK |
682 | </ng-template> |
683 | ||
684 | <ng-template ptTemplate="help"> | |
685 | <ng-container i18n> | |
5baee5fc | 686 | If your instance is explicitly allowed by Twitter, a video player will be embedded in the Twitter feed on PeerTube video share.<br /> |
dc5bb5ce | 687 | If the instance is not, we use an image link card that will redirect to your PeerTube instance.<br /><br /> |
482fa503 RK |
688 | Check this checkbox, save the configuration and test with a video URL of your instance (https://example.com/videos/watch/blabla) on |
689 | <a target='_blank' rel='noopener noreferrer' href='https://cards-dev.twitter.com/validator'>https://cards-dev.twitter.com/validator</a> | |
5baee5fc | 690 | to see if you instance is allowed. |
482fa503 RK |
691 | </ng-container> |
692 | </ng-template> | |
693 | </my-peertube-checkbox> | |
694 | </div> | |
695 | ||
696 | </ng-container> | |
697 | </ng-container> | |
698 | ||
699 | </div> | |
700 | </div> | |
45c6bcf3 C |
701 | </ng-template> |
702 | </ng-container> | |
8be1afa1 | 703 | |
fb719404 | 704 | <div ngbNavItem="live"> |
c6c0fa6c C |
705 | <a ngbNavLink i18n>Live streaming</a> |
706 | ||
707 | <ng-template ngbNavContent> | |
708 | ||
709 | <div class="form-row mt-5"> | |
710 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
711 | <div i18n class="inner-form-title">LIVE</div> | |
712 | <div i18n class="inner-form-description"> | |
dc5bb5ce | 713 | Enable users of your instance to stream live. |
c6c0fa6c C |
714 | </div> |
715 | </div> | |
716 | ||
717 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> | |
718 | ||
719 | <ng-container formGroupName="live"> | |
720 | ||
721 | <div class="form-group"> | |
722 | <my-peertube-checkbox inputName="liveEnabled" formControlName="enabled"> | |
723 | <ng-template ptTemplate="label"> | |
724 | <ng-container i18n>Allow live streaming</ng-container> | |
725 | </ng-template> | |
726 | ||
fb719404 C |
727 | <ng-container ngProjectAs="description" i18n> |
728 | ⚠️ Enabling live streaming requires trust in your users and extra moderation work | |
729 | </ng-container> | |
c6c0fa6c | 730 | |
fb719404 | 731 | <ng-container ngProjectAs="extra"> |
c6c0fa6c C |
732 | |
733 | <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isLiveEnabled() }"> | |
734 | <my-peertube-checkbox | |
fb719404 C |
735 | inputName="liveAllowReplay" formControlName="allowReplay" |
736 | i18n-labelText labelText="Allow your users to automatically publish a replay of their live" | |
c6c0fa6c | 737 | > |
fb719404 C |
738 | <ng-container ngProjectAs="description" i18n> |
739 | If the user quota is reached, PeerTube will automatically terminate the live streaming | |
c6c0fa6c C |
740 | </ng-container> |
741 | </my-peertube-checkbox> | |
742 | </div> | |
743 | ||
a056ca48 C |
744 | <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isLiveEnabled() }"> |
745 | <label i18n for="liveMaxInstanceLives">Max lives created on your instance (-1 for "unlimited")</label> | |
746 | <input type="number" name="liveMaxInstanceLives" formControlName="maxInstanceLives" /> | |
747 | </div> | |
748 | ||
749 | <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isLiveEnabled() }"> | |
750 | <label i18n for="liveMaxUserLives">Max lives created per user (-1 for "unlimited")</label> | |
751 | <input type="number" name="liveMaxUserLives" formControlName="maxUserLives" /> | |
752 | </div> | |
753 | ||
fb719404 C |
754 | <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isLiveEnabled() }"> |
755 | <label i18n for="liveMaxDuration">Max live duration</label> | |
c6c0fa6c | 756 | <div class="peertube-select-container"> |
fb719404 C |
757 | <select id="liveMaxDuration" formControlName="maxDuration" class="form-control"> |
758 | <option *ngFor="let liveMaxDurationOption of liveMaxDurationOptions" [value]="liveMaxDurationOption.value"> | |
759 | {{ liveMaxDurationOption.label }} | |
c6c0fa6c C |
760 | </option> |
761 | </select> | |
762 | </div> | |
c6c0fa6c C |
763 | </div> |
764 | ||
fb719404 C |
765 | <ng-container formGroupName="transcoding"> |
766 | ||
767 | <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isLiveEnabled() }"> | |
768 | <my-peertube-checkbox | |
769 | inputName="liveTranscodingEnabled" formControlName="enabled" | |
770 | i18n-labelText labelText="Enable live transcoding" | |
771 | > | |
772 | <ng-container ngProjectAs="description" i18n> | |
773 | Requires a lot of CPU! | |
774 | </ng-container> | |
775 | </my-peertube-checkbox> | |
c6c0fa6c | 776 | </div> |
fb719404 C |
777 | |
778 | <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isLiveEnabled() || !isLiveTranscodingEnabled() }"> | |
779 | <label i18n for="liveTranscodingThreads">Live transcoding threads</label> | |
780 | <div class="peertube-select-container"> | |
781 | <select id="liveTranscodingThreads" formControlName="threads" class="form-control"> | |
782 | <option *ngFor="let transcodingThreadOption of transcodingThreadOptions" [value]="transcodingThreadOption.value"> | |
783 | {{ transcodingThreadOption.label }} | |
784 | </option> | |
785 | </select> | |
786 | </div> | |
787 | <div *ngIf="formErrors.live.transcoding.threads" class="form-error">{{ formErrors.live.transcoding.threads }}</div> | |
788 | </div> | |
789 | ||
790 | <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isLiveEnabled() || !isLiveTranscodingEnabled() }"> | |
791 | <label i18n for="liveTranscodingThreads">Live resolutions to generate</label> | |
792 | ||
793 | <div class="ml-2 mt-2 d-flex flex-column"> | |
794 | <ng-container formGroupName="resolutions"> | |
795 | <div class="form-group" *ngFor="let resolution of liveResolutions"> | |
796 | <my-peertube-checkbox | |
797 | [inputName]="getResolutionKey(resolution.id)" [formControlName]="resolution.id" | |
798 | labelText="{{resolution.label}}" | |
799 | > | |
800 | <ng-template *ngIf="resolution.description" ptTemplate="help"> | |
801 | <div [innerHTML]="resolution.description"></div> | |
802 | </ng-template> | |
803 | </my-peertube-checkbox> | |
804 | </div> | |
805 | </ng-container> | |
806 | </div> | |
807 | </div> | |
808 | </ng-container> | |
c6c0fa6c C |
809 | </ng-container> |
810 | </my-peertube-checkbox> | |
811 | </div> | |
812 | </ng-container> | |
813 | </div> | |
814 | </div> | |
815 | ||
816 | </ng-template> | |
fb719404 | 817 | </div> |
c6c0fa6c | 818 | |
45c6bcf3 C |
819 | <ng-container ngbNavItem="advanced-configuration"> |
820 | <a ngbNavLink i18n>Advanced configuration</a> | |
63347a0f | 821 | |
45c6bcf3 | 822 | <ng-template ngbNavContent> |
63347a0f | 823 | |
482fa503 RK |
824 | <div class="form-row mt-5"> <!-- transcoding grid --> |
825 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
826 | <div i18n class="inner-form-title">TRANSCODING</div> | |
9b307858 RK |
827 | <div i18n class="inner-form-description"> |
828 | Process uploaded videos so that they are in a streamable form that any device can play. Though costly in | |
829 | resources, this is a critical part of PeerTube, so tread carefully. | |
830 | </div> | |
14e2014a C |
831 | </div> |
832 | ||
482fa503 | 833 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> |
3866f1a0 | 834 | |
482fa503 | 835 | <ng-container formGroupName="transcoding"> |
536598cf | 836 | |
482fa503 RK |
837 | <div class="form-group"> |
838 | <my-peertube-checkbox inputName="transcodingEnabled" formControlName="enabled"> | |
839 | <ng-template ptTemplate="label"> | |
840 | <ng-container i18n>Transcoding enabled</ng-container> | |
841 | </ng-template> | |
45c6bcf3 | 842 | |
5a71acd2 | 843 | <ng-template ptTemplate="help"> |
482fa503 RK |
844 | <ng-container i18n>If you disable transcoding, many videos from your users will not work!</ng-container> |
845 | </ng-template> | |
5a71acd2 | 846 | |
482fa503 | 847 | <ng-container ngProjectAs="extra"> |
04cda1d7 | 848 | |
482fa503 RK |
849 | <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isTranscodingEnabled() }"> |
850 | <my-peertube-checkbox | |
851 | inputName="transcodingAllowAdditionalExtensions" formControlName="allowAdditionalExtensions" | |
852 | i18n-labelText labelText="Allow additional extensions" | |
853 | > | |
9b307858 | 854 | <ng-container ngProjectAs="description"> |
fccbbc1a | 855 | <span i18n>Allows users to upload .mkv, .mov, .avi, .wmv, .flv, .f4v, .3g2, .3gp, .mts, m2ts, .mxf, .nut videos.</span> |
9b307858 | 856 | </ng-container> |
482fa503 RK |
857 | </my-peertube-checkbox> |
858 | </div> | |
45c6bcf3 | 859 | |
482fa503 RK |
860 | <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isTranscodingEnabled() }"> |
861 | <my-peertube-checkbox | |
862 | inputName="transcodingAllowAudioFiles" formControlName="allowAudioFiles" | |
863 | i18n-labelText labelText="Allow audio files upload" | |
864 | > | |
9b307858 | 865 | <ng-container ngProjectAs="description"> |
76314386 | 866 | <span i18n>Allows users to upload audio files that will be merged with the preview file on upload.</span> |
9b307858 | 867 | </ng-container> |
482fa503 RK |
868 | </my-peertube-checkbox> |
869 | </div> | |
04cda1d7 | 870 | |
482fa503 RK |
871 | <ng-container formGroupName="webtorrent"> |
872 | <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isTranscodingEnabled() }"> | |
873 | <my-peertube-checkbox | |
874 | inputName="transcodingWebTorrentEnabled" formControlName="enabled" | |
875 | i18n-labelText labelText="WebTorrent support enabled" | |
876 | > | |
877 | <ng-template ptTemplate="help"> | |
878 | <ng-container i18n> | |
879 | <strong>Experimental, we suggest you to not disable webtorrent support for now</strong> | |
45c6bcf3 | 880 | |
482fa503 RK |
881 | <p>If you also enabled HLS support, it will multiply videos storage by 2</p> |
882 | ||
883 | <br /> | |
884 | ||
885 | <strong>If disabled, breaks federation with PeerTube instances < 2.1</strong> | |
886 | </ng-container> | |
887 | </ng-template> | |
888 | </my-peertube-checkbox> | |
889 | </div> | |
5a71acd2 | 890 | </ng-container> |
482fa503 RK |
891 | |
892 | <ng-container formGroupName="hls"> | |
893 | <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isTranscodingEnabled() }"> | |
894 | <my-peertube-checkbox | |
895 | inputName="transcodingHlsEnabled" formControlName="enabled" | |
f6f371ae | 896 | i18n-labelText labelText="HLS with P2P support enabled" |
482fa503 RK |
897 | > |
898 | <ng-template ptTemplate="help"> | |
899 | <ng-container i18n> | |
900 | <strong>Requires ffmpeg >= 4.1</strong> | |
45c6bcf3 | 901 | |
482fa503 RK |
902 | <p>Generate HLS playlists and fragmented MP4 files resulting in a better playback than with the current default player:</p> |
903 | <ul> | |
904 | <li>Resolution change is smoother</li> | |
905 | <li>Faster playback in particular with long videos</li> | |
906 | <li>More stable playback (less bugs/infinite loading)</li> | |
907 | </ul> | |
45c6bcf3 | 908 | |
482fa503 RK |
909 | <p>If you also enabled WebTorrent support, it will multiply videos storage by 2</p> |
910 | </ng-container> | |
911 | </ng-template> | |
912 | </my-peertube-checkbox> | |
913 | </div> | |
914 | </ng-container> | |
482fa503 RK |
915 | |
916 | </ng-container> | |
5a71acd2 C |
917 | </my-peertube-checkbox> |
918 | </div> | |
482fa503 | 919 | |
2bc9bd08 RK |
920 | <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isTranscodingEnabled() }"> |
921 | <label i18n for="transcodingThreads">Transcoding threads</label> | |
922 | <div class="peertube-select-container"> | |
923 | <select id="transcodingThreads" formControlName="threads" class="form-control"> | |
924 | <option *ngFor="let transcodingThreadOption of transcodingThreadOptions" [value]="transcodingThreadOption.value"> | |
925 | {{ transcodingThreadOption.label }} | |
926 | </option> | |
927 | </select> | |
9b307858 | 928 | </div> |
2bc9bd08 | 929 | <div *ngIf="formErrors.transcoding.threads" class="form-error">{{ formErrors.transcoding.threads }}</div> |
9b307858 RK |
930 | </div> |
931 | ||
932 | <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isTranscodingEnabled() }"> | |
933 | ||
c6c0fa6c | 934 | <label i18n>Resolutions to generate</label> |
9b307858 RK |
935 | |
936 | <div class="ml-2 mt-2 d-flex flex-column"> | |
937 | <ng-container formGroupName="resolutions"> | |
938 | <div class="form-group" *ngFor="let resolution of resolutions"> | |
939 | <my-peertube-checkbox | |
940 | [inputName]="getResolutionKey(resolution.id)" [formControlName]="resolution.id" | |
941 | labelText="{{resolution.label}}" | |
942 | > | |
943 | <ng-template *ngIf="resolution.description" ptTemplate="help"> | |
944 | <div [innerHTML]="resolution.description"></div> | |
945 | </ng-template> | |
946 | </my-peertube-checkbox> | |
947 | </div> | |
948 | </ng-container> | |
949 | </div> | |
950 | ||
951 | </div> | |
952 | ||
5a71acd2 C |
953 | </ng-container> |
954 | ||
482fa503 RK |
955 | </div> |
956 | </div> | |
5d9e4eaa | 957 | |
482fa503 RK |
958 | <div class="form-row mt-4"> <!-- cache grid --> |
959 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
9b307858 RK |
960 | <div i18n class="inner-form-title">CACHE</div> |
961 | <div i18n class="inner-form-description"> | |
962 | Some files are not federated, and fetched when necessary. Define their caching policies. | |
482fa503 RK |
963 | </div> |
964 | </div> | |
5a71acd2 | 965 | |
482fa503 | 966 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> |
5d9e4eaa | 967 | |
482fa503 RK |
968 | <ng-container formGroupName="cache"> |
969 | <div class="form-group" formGroupName="previews"> | |
970 | <label i18n for="cachePreviewsSize">Number of previews to keep in cache</label> | |
971 | <input | |
a6d5ff76 | 972 | type="number" min="0" id="cachePreviewsSize" class="form-control" |
482fa503 RK |
973 | formControlName="size" [ngClass]="{ 'input-error': formErrors['cache.previews.size'] }" |
974 | > | |
975 | <div *ngIf="formErrors.cache.previews.size" class="form-error">{{ formErrors.cache.previews.size }}</div> | |
3866f1a0 | 976 | </div> |
63347a0f | 977 | |
482fa503 RK |
978 | <div class="form-group" formGroupName="captions"> |
979 | <label i18n for="cacheCaptionsSize">Number of video captions to keep in cache</label> | |
980 | <input | |
a6d5ff76 | 981 | type="number" min="0" id="cacheCaptionsSize" class="form-control" |
482fa503 | 982 | formControlName="size" [ngClass]="{ 'input-error': formErrors['cache.captions.size'] }" |
46db9430 | 983 | > |
482fa503 | 984 | <div *ngIf="formErrors.cache.captions.size" class="form-error">{{ formErrors.cache.captions.size }}</div> |
3866f1a0 C |
985 | </div> |
986 | </ng-container> | |
987 | ||
63347a0f | 988 | </div> |
482fa503 | 989 | </div> |
63347a0f | 990 | |
482fa503 RK |
991 | <div class="form-row mt-4"> <!-- cache grid --> |
992 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
45e0d669 | 993 | <div class="anchor" id="customizations"></div> <!-- customizations anchor --> |
482fa503 | 994 | <div i18n class="inner-form-title">CUSTOMIZATIONS</div> |
9b307858 RK |
995 | <div i18n class="inner-form-description"> |
996 | Slight modifications to your PeerTube instance for when creating a plugin or theme is overkill. | |
997 | </div> | |
63347a0f | 998 | </div> |
63347a0f | 999 | |
482fa503 RK |
1000 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> |
1001 | ||
1002 | <ng-container formGroupName="instance"> | |
1003 | <ng-container formGroupName="customizations"> | |
1004 | <div class="form-group"> | |
1005 | <label i18n for="customizationJavascript">JavaScript</label> | |
1006 | <my-help> | |
1007 | <ng-template ptTemplate="customHtml"> | |
1008 | <ng-container i18n> | |
1009 | Write JavaScript code directly.<br />Example: <pre>console.log('my instance is amazing');</pre> | |
1010 | </ng-container> | |
1011 | </ng-template> | |
1012 | </my-help> | |
1013 | ||
1014 | <textarea | |
a6d5ff76 | 1015 | id="customizationJavascript" formControlName="javascript" class="form-control" |
482fa503 RK |
1016 | [ngClass]="{ 'input-error': formErrors['instance.customizations.javascript'] }" |
1017 | ></textarea> | |
1018 | ||
1019 | <div *ngIf="formErrors.instance.customizations.javascript" class="form-error">{{ formErrors.instance.customizations.javascript }}</div> | |
1020 | </div> | |
421d935d | 1021 | |
482fa503 RK |
1022 | <div class="form-group"> |
1023 | <label for="customizationCSS">CSS</label> | |
1024 | ||
1025 | <my-help> | |
1026 | <ng-template ptTemplate="customHtml"> | |
1027 | <ng-container i18n> | |
1028 | Write CSS code directly. Example:<br /><br /> | |
1029 | <pre> | |
1030 | #custom-css {{ '{' }} | |
1031 | color: red; | |
1032 | {{ '}' }} | |
1033 | </pre> | |
1034 | Prepend with <em>#custom-css</em> to override styles. Example:<br /><br /> | |
1035 | <pre> | |
1036 | #custom-css .logged-in-email {{ '{' }} | |
1037 | color: red; | |
1038 | {{ '}' }} | |
1039 | </pre> | |
1040 | </ng-container> | |
1041 | </ng-template> | |
1042 | </my-help> | |
1043 | ||
1044 | <textarea | |
a6d5ff76 | 1045 | id="customizationCSS" formControlName="css" class="form-control" |
482fa503 RK |
1046 | [ngClass]="{ 'input-error': formErrors['instance.customizations.css'] }" |
1047 | ></textarea> | |
1048 | <div *ngIf="formErrors.instance.customizations.css" class="form-error">{{ formErrors.instance.customizations.css }}</div> | |
1049 | </div> | |
1050 | </ng-container> | |
1051 | </ng-container> | |
421d935d | 1052 | |
482fa503 RK |
1053 | </div> |
1054 | </div> | |
63347a0f | 1055 | |
63347a0f | 1056 | </ng-template> |
45c6bcf3 C |
1057 | </ng-container> |
1058 | </div> | |
1059 | ||
1060 | <div [ngbNavOutlet]="nav"></div> | |
00b5556c | 1061 | |
482fa503 RK |
1062 | <div class="form-row mt-4"> <!-- submit placement block --> |
1063 | <div class="col-md-7 col-xl-5"></div> | |
1064 | <div class="col-md-5 col-xl-5"> | |
fb719404 C |
1065 | <span class="form-error submit-error" i18n *ngIf="!form.valid"> |
1066 | It seems like the configuration is invalid. Please search for potential errors in the different tabs. | |
1067 | </span> | |
1068 | ||
1069 | <span class="form-error submit-error" i18n *ngIf="!hasLiveAllowReplayConsistentOptions()"> | |
1070 | You cannot allow live replay if you don't enable transcoding. | |
1071 | </span> | |
72c33e71 | 1072 | |
fb719404 | 1073 | <input (click)="formValidated()" type="submit" i18n-value value="Update configuration" [disabled]="!form.valid || !hasConsistentOptions()"> |
482fa503 RK |
1074 | </div> |
1075 | </div> | |
fd206f0b | 1076 | </form> |