]>
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> | |
60 | </div> | |
61 | ||
fd206f0b C |
62 | <div class="inner-form-title">Cache</div> |
63 | ||
64 | <div class="form-group"> | |
65 | <label for="cachePreviewsSize">Preview cache size</label> | |
66 | <input | |
67 | type="text" id="cachePreviewsSize" | |
68 | formControlName="cachePreviewsSize" [ngClass]="{ 'input-error': formErrors['cachePreviewsSize'] }" | |
69 | > | |
70 | <div *ngIf="formErrors.cachePreviewsSize" class="form-error"> | |
71 | {{ formErrors.cachePreviewsSize }} | |
72 | </div> | |
73 | </div> | |
74 | ||
75 | <div class="inner-form-title">Signup</div> | |
76 | ||
77 | <div class="form-group"> | |
78 | <input type="checkbox" id="signupEnabled" formControlName="signupEnabled"> | |
79 | ||
80 | <label for="signupEnabled"></label> | |
81 | <label for="signupEnabled">Signup enabled</label> | |
82 | </div> | |
83 | ||
84 | <div *ngIf="isSignupEnabled()" class="form-group"> | |
85 | <label for="signupLimit">Signup limit</label> | |
86 | <input | |
87 | type="text" id="signupLimit" | |
88 | formControlName="signupLimit" [ngClass]="{ 'input-error': formErrors['signupLimit'] }" | |
89 | > | |
90 | <div *ngIf="formErrors.signupLimit" class="form-error"> | |
91 | {{ formErrors.signupLimit }} | |
92 | </div> | |
93 | </div> | |
94 | ||
95 | <div class="inner-form-title">Administrator</div> | |
96 | ||
97 | <div class="form-group"> | |
98 | <label for="adminEmail">Admin email</label> | |
99 | <input | |
100 | type="text" id="adminEmail" | |
101 | formControlName="adminEmail" [ngClass]="{ 'input-error': formErrors['adminEmail'] }" | |
102 | > | |
103 | <div *ngIf="formErrors.adminEmail" class="form-error"> | |
104 | {{ formErrors.adminEmail }} | |
105 | </div> | |
106 | </div> | |
107 | ||
108 | <div class="inner-form-title">Users</div> | |
109 | ||
110 | <div class="form-group"> | |
111 | <label for="userVideoQuota">User default video quota</label> | |
112 | <div class="peertube-select-container"> | |
113 | <select id="userVideoQuota" formControlName="userVideoQuota"> | |
114 | <option *ngFor="let videoQuotaOption of videoQuotaOptions" [value]="videoQuotaOption.value"> | |
115 | {{ videoQuotaOption.label }} | |
116 | </option> | |
117 | </select> | |
118 | </div> | |
119 | </div> | |
120 | ||
121 | <div class="inner-form-title">Transcoding</div> | |
122 | ||
123 | <div class="form-group"> | |
124 | <input type="checkbox" id="transcodingEnabled" formControlName="transcodingEnabled"> | |
125 | ||
126 | <label for="transcodingEnabled"></label> | |
127 | <label for="transcodingEnabled">Transcoding enabled</label> | |
128 | </div> | |
129 | ||
130 | <ng-template [ngIf]="isTranscodingEnabled()"> | |
131 | ||
132 | <div class="form-group"> | |
133 | <label for="transcodingThreads">Transcoding threads</label> | |
134 | <div class="peertube-select-container"> | |
135 | <select id="transcodingThreads" formControlName="transcodingThreads"> | |
136 | <option *ngFor="let transcodingThreadOption of transcodingThreadOptions" [value]="transcodingThreadOption.value"> | |
137 | {{ transcodingThreadOption.label }} | |
138 | </option> | |
139 | </select> | |
140 | </div> | |
141 | </div> | |
142 | ||
143 | <div class="form-group" *ngFor="let resolution of resolutions"> | |
144 | <input | |
145 | type="checkbox" [id]="getResolutionKey(resolution)" | |
146 | [formControlName]="getResolutionKey(resolution)" | |
147 | > | |
148 | <label [for]="getResolutionKey(resolution)"></label> | |
149 | <label [for]="getResolutionKey(resolution)">Resolution {{ resolution }} enabled</label> | |
150 | </div> | |
151 | </ng-template> | |
152 | ||
00b5556c C |
153 | <div class="inner-form-title">Customizations</div> |
154 | ||
155 | <div class="form-group"> | |
156 | <label for="customizationJavascript">JavaScript</label> | |
0394b1e1 | 157 | <my-help helpType="custom" customHtml="Write directly JavaScript code.<br />Example: console.log('my instance is amazing');"></my-help> |
00b5556c C |
158 | <textarea |
159 | id="customizationJavascript" formControlName="customizationJavascript" | |
160 | [ngClass]="{ 'input-error': formErrors['customizationJavascript'] }" | |
161 | ></textarea> | |
162 | <div *ngIf="formErrors.customizationJavascript" class="form-error"> | |
163 | {{ formErrors.customizationJavascript }} | |
164 | </div> | |
165 | </div> | |
166 | ||
167 | <div class="form-group"> | |
168 | <label for="customizationCSS">CSS</label> | |
0394b1e1 | 169 | <my-help helpType="custom" customHtml="Write directly CSS code.<br />Example: body { background-color: red; }"></my-help> |
00b5556c C |
170 | <textarea |
171 | id="customizationCSS" formControlName="customizationCSS" | |
172 | [ngClass]="{ 'input-error': formErrors['customizationCSS'] }" | |
173 | ></textarea> | |
174 | <div *ngIf="formErrors.customizationCSS" class="form-error"> | |
175 | {{ formErrors.customizationCSS }} | |
176 | </div> | |
177 | </div> | |
178 | ||
8a8e02a4 | 179 | <input (click)="formValidated()" type="submit" value="Update configuration" [disabled]="!form.valid"> |
fd206f0b | 180 | </form> |