]>
Commit | Line | Data |
---|---|---|
fd206f0b C |
1 | <div class="admin-sub-title">Update PeerTube configuration</div> |
2 | ||
8a8e02a4 | 3 | <form role="form" [formGroup]="form"> |
fd206f0b | 4 | |
66b16caf C |
5 | <div class="inner-form-title">Instance</div> |
6 | ||
7 | <div class="form-group"> | |
8 | <label for="instanceName">Name</label> | |
9 | <input | |
10 | type="text" id="instanceName" | |
11 | formControlName="instanceName" [ngClass]="{ 'input-error': formErrors['instanceName'] }" | |
12 | > | |
13 | <div *ngIf="formErrors.instanceName" class="form-error"> | |
14 | {{ formErrors.instanceName }} | |
15 | </div> | |
16 | </div> | |
17 | ||
18 | <div class="form-group"> | |
8a8e02a4 | 19 | <label for="instanceDescription">Description</label><my-help helpType="markdownText"></my-help> |
66b16caf C |
20 | <my-markdown-textarea |
21 | id="instanceDescription" formControlName="instanceDescription" textareaWidth="500px" [previewColumn]="true" | |
22 | [classes]="{ 'input-error': formErrors['instanceDescription'] }" | |
23 | ></my-markdown-textarea> | |
24 | <div *ngIf="formErrors.instanceDescription" class="form-error"> | |
25 | {{ formErrors.instanceDescription }} | |
26 | </div> | |
27 | </div> | |
28 | ||
29 | <div class="form-group"> | |
8a8e02a4 | 30 | <label for="instanceTerms">Terms</label><my-help helpType="markdownText"></my-help> |
66b16caf C |
31 | <my-markdown-textarea |
32 | id="instanceTerms" formControlName="instanceTerms" textareaWidth="500px" [previewColumn]="true" | |
33 | [ngClass]="{ 'input-error': formErrors['instanceTerms'] }" | |
34 | ></my-markdown-textarea> | |
35 | <div *ngIf="formErrors.instanceTerms" class="form-error"> | |
36 | {{ formErrors.instanceTerms }} | |
37 | </div> | |
38 | </div> | |
39 | ||
901637bb C |
40 | <div class="form-group"> |
41 | <label for="instanceDefaultClientRoute">Default client route</label> | |
42 | <div class="peertube-select-container"> | |
43 | <select id="instanceDefaultClientRoute" formControlName="instanceDefaultClientRoute"> | |
44 | <option value="/videos/trending">Videos Trending</option> | |
45 | <option value="/videos/recently-added">Videos Recently Added</option> | |
46 | </select> | |
47 | </div> | |
48 | </div> | |
49 | ||
fd206f0b C |
50 | <div class="inner-form-title">Cache</div> |
51 | ||
52 | <div class="form-group"> | |
53 | <label for="cachePreviewsSize">Preview cache size</label> | |
54 | <input | |
55 | type="text" id="cachePreviewsSize" | |
56 | formControlName="cachePreviewsSize" [ngClass]="{ 'input-error': formErrors['cachePreviewsSize'] }" | |
57 | > | |
58 | <div *ngIf="formErrors.cachePreviewsSize" class="form-error"> | |
59 | {{ formErrors.cachePreviewsSize }} | |
60 | </div> | |
61 | </div> | |
62 | ||
63 | <div class="inner-form-title">Signup</div> | |
64 | ||
65 | <div class="form-group"> | |
66 | <input type="checkbox" id="signupEnabled" formControlName="signupEnabled"> | |
67 | ||
68 | <label for="signupEnabled"></label> | |
69 | <label for="signupEnabled">Signup enabled</label> | |
70 | </div> | |
71 | ||
72 | <div *ngIf="isSignupEnabled()" class="form-group"> | |
73 | <label for="signupLimit">Signup limit</label> | |
74 | <input | |
75 | type="text" id="signupLimit" | |
76 | formControlName="signupLimit" [ngClass]="{ 'input-error': formErrors['signupLimit'] }" | |
77 | > | |
78 | <div *ngIf="formErrors.signupLimit" class="form-error"> | |
79 | {{ formErrors.signupLimit }} | |
80 | </div> | |
81 | </div> | |
82 | ||
83 | <div class="inner-form-title">Administrator</div> | |
84 | ||
85 | <div class="form-group"> | |
86 | <label for="adminEmail">Admin email</label> | |
87 | <input | |
88 | type="text" id="adminEmail" | |
89 | formControlName="adminEmail" [ngClass]="{ 'input-error': formErrors['adminEmail'] }" | |
90 | > | |
91 | <div *ngIf="formErrors.adminEmail" class="form-error"> | |
92 | {{ formErrors.adminEmail }} | |
93 | </div> | |
94 | </div> | |
95 | ||
96 | <div class="inner-form-title">Users</div> | |
97 | ||
98 | <div class="form-group"> | |
99 | <label for="userVideoQuota">User default video quota</label> | |
100 | <div class="peertube-select-container"> | |
101 | <select id="userVideoQuota" formControlName="userVideoQuota"> | |
102 | <option *ngFor="let videoQuotaOption of videoQuotaOptions" [value]="videoQuotaOption.value"> | |
103 | {{ videoQuotaOption.label }} | |
104 | </option> | |
105 | </select> | |
106 | </div> | |
107 | </div> | |
108 | ||
109 | <div class="inner-form-title">Transcoding</div> | |
110 | ||
111 | <div class="form-group"> | |
112 | <input type="checkbox" id="transcodingEnabled" formControlName="transcodingEnabled"> | |
113 | ||
114 | <label for="transcodingEnabled"></label> | |
115 | <label for="transcodingEnabled">Transcoding enabled</label> | |
116 | </div> | |
117 | ||
118 | <ng-template [ngIf]="isTranscodingEnabled()"> | |
119 | ||
120 | <div class="form-group"> | |
121 | <label for="transcodingThreads">Transcoding threads</label> | |
122 | <div class="peertube-select-container"> | |
123 | <select id="transcodingThreads" formControlName="transcodingThreads"> | |
124 | <option *ngFor="let transcodingThreadOption of transcodingThreadOptions" [value]="transcodingThreadOption.value"> | |
125 | {{ transcodingThreadOption.label }} | |
126 | </option> | |
127 | </select> | |
128 | </div> | |
129 | </div> | |
130 | ||
131 | <div class="form-group" *ngFor="let resolution of resolutions"> | |
132 | <input | |
133 | type="checkbox" [id]="getResolutionKey(resolution)" | |
134 | [formControlName]="getResolutionKey(resolution)" | |
135 | > | |
136 | <label [for]="getResolutionKey(resolution)"></label> | |
137 | <label [for]="getResolutionKey(resolution)">Resolution {{ resolution }} enabled</label> | |
138 | </div> | |
139 | </ng-template> | |
140 | ||
00b5556c C |
141 | <div class="inner-form-title">Customizations</div> |
142 | ||
143 | <div class="form-group"> | |
144 | <label for="customizationJavascript">JavaScript</label> | |
0394b1e1 | 145 | <my-help helpType="custom" customHtml="Write directly JavaScript code.<br />Example: console.log('my instance is amazing');"></my-help> |
00b5556c C |
146 | <textarea |
147 | id="customizationJavascript" formControlName="customizationJavascript" | |
148 | [ngClass]="{ 'input-error': formErrors['customizationJavascript'] }" | |
149 | ></textarea> | |
150 | <div *ngIf="formErrors.customizationJavascript" class="form-error"> | |
151 | {{ formErrors.customizationJavascript }} | |
152 | </div> | |
153 | </div> | |
154 | ||
155 | <div class="form-group"> | |
156 | <label for="customizationCSS">CSS</label> | |
0394b1e1 | 157 | <my-help helpType="custom" customHtml="Write directly CSS code.<br />Example: body { background-color: red; }"></my-help> |
00b5556c C |
158 | <textarea |
159 | id="customizationCSS" formControlName="customizationCSS" | |
160 | [ngClass]="{ 'input-error': formErrors['customizationCSS'] }" | |
161 | ></textarea> | |
162 | <div *ngIf="formErrors.customizationCSS" class="form-error"> | |
163 | {{ formErrors.customizationCSS }} | |
164 | </div> | |
165 | </div> | |
166 | ||
8a8e02a4 | 167 | <input (click)="formValidated()" type="submit" value="Update configuration" [disabled]="!form.valid"> |
fd206f0b | 168 | </form> |