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