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