1 <div class=
"admin-sub-title">Update PeerTube configuration
</div>
3 <form role=
"form" [formGroup]=
"form">
5 <div class=
"inner-form-title">Instance
</div>
7 <div class=
"form-group">
8 <label for=
"instanceName">Name
</label>
10 type=
"text" id=
"instanceName"
11 formControlName=
"instanceName" [ngClass]=
"{ 'input-error': formErrors['instanceName'] }"
13 <div *
ngIf=
"formErrors.instanceName" class=
"form-error">
14 {{ formErrors.instanceName }}
18 <div class=
"form-group">
19 <label for=
"instanceShortDescription">Short description
</label>
21 id=
"instanceShortDescription" formControlName=
"instanceShortDescription"
22 [ngClass]=
"{ 'input-error': formErrors['instanceShortDescription'] }"
24 <div *
ngIf=
"formErrors.instanceShortDescription" class=
"form-error">
25 {{ formErrors.instanceShortDescription }}
29 <div class=
"form-group">
30 <label for=
"instanceDescription">Description
</label><my-help helpType=
"markdownText"></my-help>
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 }}
40 <div class=
"form-group">
41 <label for=
"instanceTerms">Terms
</label><my-help helpType=
"markdownText"></my-help>
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 }}
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>
61 <div class=
"inner-form-title">Cache
</div>
63 <div class=
"form-group">
64 <label for=
"cachePreviewsSize">Preview cache size
</label>
66 type=
"text" id=
"cachePreviewsSize"
67 formControlName=
"cachePreviewsSize" [ngClass]=
"{ 'input-error': formErrors['cachePreviewsSize'] }"
69 <div *
ngIf=
"formErrors.cachePreviewsSize" class=
"form-error">
70 {{ formErrors.cachePreviewsSize }}
74 <div class=
"inner-form-title">Signup
</div>
76 <div class=
"form-group">
77 <input type=
"checkbox" id=
"signupEnabled" formControlName=
"signupEnabled">
79 <label for=
"signupEnabled"></label>
80 <label for=
"signupEnabled">Signup enabled
</label>
83 <div *
ngIf=
"isSignupEnabled()" class=
"form-group">
84 <label for=
"signupLimit">Signup limit
</label>
86 type=
"text" id=
"signupLimit"
87 formControlName=
"signupLimit" [ngClass]=
"{ 'input-error': formErrors['signupLimit'] }"
89 <div *
ngIf=
"formErrors.signupLimit" class=
"form-error">
90 {{ formErrors.signupLimit }}
94 <div class=
"inner-form-title">Administrator
</div>
96 <div class=
"form-group">
97 <label for=
"adminEmail">Admin email
</label>
99 type=
"text" id=
"adminEmail"
100 formControlName=
"adminEmail" [ngClass]=
"{ 'input-error': formErrors['adminEmail'] }"
102 <div *
ngIf=
"formErrors.adminEmail" class=
"form-error">
103 {{ formErrors.adminEmail }}
107 <div class=
"inner-form-title">Users
</div>
109 <div class=
"form-group">
110 <label for=
"userVideoQuota">User default video quota
</label>
111 <div class=
"peertube-select-container">
112 <select id=
"userVideoQuota" formControlName=
"userVideoQuota">
113 <option *
ngFor=
"let videoQuotaOption of videoQuotaOptions" [value]=
"videoQuotaOption.value">
114 {{ videoQuotaOption.label }}
120 <div class=
"inner-form-title">Transcoding
</div>
122 <div class=
"form-group">
123 <input type=
"checkbox" id=
"transcodingEnabled" formControlName=
"transcodingEnabled">
125 <label for=
"transcodingEnabled"></label>
126 <label for=
"transcodingEnabled">Transcoding enabled
</label>
129 <ng-template [ngIf]=
"isTranscodingEnabled()">
131 <div class=
"form-group">
132 <label for=
"transcodingThreads">Transcoding threads
</label>
133 <div class=
"peertube-select-container">
134 <select id=
"transcodingThreads" formControlName=
"transcodingThreads">
135 <option *
ngFor=
"let transcodingThreadOption of transcodingThreadOptions" [value]=
"transcodingThreadOption.value">
136 {{ transcodingThreadOption.label }}
142 <div class=
"form-group" *
ngFor=
"let resolution of resolutions">
144 type=
"checkbox" [id]=
"getResolutionKey(resolution)"
145 [formControlName]=
"getResolutionKey(resolution)"
147 <label [for]=
"getResolutionKey(resolution)"></label>
148 <label [for]=
"getResolutionKey(resolution)">Resolution {{ resolution }} enabled
</label>
152 <div class=
"inner-form-title">Customizations
</div>
154 <div class=
"form-group">
155 <label for=
"customizationJavascript">JavaScript
</label>
156 <my-help helpType=
"custom" customHtml=
"Write directly JavaScript code.<br />Example: console.log('my instance is amazing');"></my-help>
158 id=
"customizationJavascript" formControlName=
"customizationJavascript"
159 [ngClass]=
"{ 'input-error': formErrors['customizationJavascript'] }"
161 <div *
ngIf=
"formErrors.customizationJavascript" class=
"form-error">
162 {{ formErrors.customizationJavascript }}
166 <div class=
"form-group">
167 <label for=
"customizationCSS">CSS
</label>
168 <my-help helpType=
"custom" customHtml=
"Write directly CSS code.<br />Example: body { background-color: red; }"></my-help>
170 id=
"customizationCSS" formControlName=
"customizationCSS"
171 [ngClass]=
"{ 'input-error': formErrors['customizationCSS'] }"
173 <div *
ngIf=
"formErrors.customizationCSS" class=
"form-error">
174 {{ formErrors.customizationCSS }}
178 <input (click)=
"formValidated()" type=
"submit" value=
"Update configuration" [disabled]=
"!form.valid">