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>
57 <option value=
"/videos/local">Local videos
</option>
62 <div class=
"inner-form-title">Cache
</div>
64 <div class=
"form-group">
65 <label for=
"cachePreviewsSize">Preview cache size
</label>
67 type=
"text" id=
"cachePreviewsSize"
68 formControlName=
"cachePreviewsSize" [ngClass]=
"{ 'input-error': formErrors['cachePreviewsSize'] }"
70 <div *
ngIf=
"formErrors.cachePreviewsSize" class=
"form-error">
71 {{ formErrors.cachePreviewsSize }}
75 <div class=
"inner-form-title">Signup
</div>
77 <div class=
"form-group">
78 <input type=
"checkbox" id=
"signupEnabled" formControlName=
"signupEnabled">
80 <label for=
"signupEnabled"></label>
81 <label for=
"signupEnabled">Signup enabled
</label>
84 <div *
ngIf=
"isSignupEnabled()" class=
"form-group">
85 <label for=
"signupLimit">Signup limit
</label>
87 type=
"text" id=
"signupLimit"
88 formControlName=
"signupLimit" [ngClass]=
"{ 'input-error': formErrors['signupLimit'] }"
90 <div *
ngIf=
"formErrors.signupLimit" class=
"form-error">
91 {{ formErrors.signupLimit }}
95 <div class=
"inner-form-title">Administrator
</div>
97 <div class=
"form-group">
98 <label for=
"adminEmail">Admin email
</label>
100 type=
"text" id=
"adminEmail"
101 formControlName=
"adminEmail" [ngClass]=
"{ 'input-error': formErrors['adminEmail'] }"
103 <div *
ngIf=
"formErrors.adminEmail" class=
"form-error">
104 {{ formErrors.adminEmail }}
108 <div class=
"inner-form-title">Users
</div>
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 }}
121 <div class=
"inner-form-title">Transcoding
</div>
123 <div class=
"form-group">
124 <input type=
"checkbox" id=
"transcodingEnabled" formControlName=
"transcodingEnabled">
126 <label for=
"transcodingEnabled"></label>
127 <label for=
"transcodingEnabled">Transcoding enabled
</label>
130 <ng-template [ngIf]=
"isTranscodingEnabled()">
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 }}
143 <div class=
"form-group" *
ngFor=
"let resolution of resolutions">
145 type=
"checkbox" [id]=
"getResolutionKey(resolution)"
146 [formControlName]=
"getResolutionKey(resolution)"
148 <label [for]=
"getResolutionKey(resolution)"></label>
149 <label [for]=
"getResolutionKey(resolution)">Resolution {{ resolution }} enabled
</label>
153 <div class=
"inner-form-title">Customizations
</div>
155 <div class=
"form-group">
156 <label for=
"customizationJavascript">JavaScript
</label>
157 <my-help helpType=
"custom" customHtml=
"Write directly JavaScript code.<br />Example: console.log('my instance is amazing');"></my-help>
159 id=
"customizationJavascript" formControlName=
"customizationJavascript"
160 [ngClass]=
"{ 'input-error': formErrors['customizationJavascript'] }"
162 <div *
ngIf=
"formErrors.customizationJavascript" class=
"form-error">
163 {{ formErrors.customizationJavascript }}
167 <div class=
"form-group">
168 <label for=
"customizationCSS">CSS
</label>
169 <my-help helpType=
"custom" customHtml=
"Write directly CSS code.<br />Example: body { background-color: red; }"></my-help>
171 id=
"customizationCSS" formControlName=
"customizationCSS"
172 [ngClass]=
"{ 'input-error': formErrors['customizationCSS'] }"
174 <div *
ngIf=
"formErrors.customizationCSS" class=
"form-error">
175 {{ formErrors.customizationCSS }}
179 <input (click)=
"formValidated()" type=
"submit" value=
"Update configuration" [disabled]=
"!form.valid">