]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html
Upgrade to bootstrap 4 first step
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / config / edit-custom-config / edit-custom-config.component.html
index 4a6c631fb82d2aaaa73974cca6f17e88cac2b226..0a032df1269b9c0c6ea3026ad495c7839b5012a9 100644 (file)
 
       <div i18n class="inner-form-title">Signup</div>
 
-      <div class="form-group">
-        <input type="checkbox" id="signupEnabled" formControlName="signupEnabled">
-
-        <label for="signupEnabled"></label>
-        <label i18n for="signupEnabled">Signup enabled</label>
-      </div>
+      <my-peertube-checkbox
+        inputName="signupEnabled" formControlName="signupEnabled"
+        i18n-labelText labelText="Signup enabled"
+      ></my-peertube-checkbox>
 
       <div *ngIf="isSignupEnabled()" class="form-group">
         <label i18n for="signupLimit">Signup limit</label>
         </div>
       </div>
 
+      <div i18n class="inner-form-title">Import</div>
+
+      <my-peertube-checkbox
+        inputName="importVideosHttpEnabled" formControlName="importVideosHttpEnabled"
+        i18n-labelText labelText="Video import with HTTP enabled"
+      ></my-peertube-checkbox>
+
+      <my-peertube-checkbox
+        inputName="importVideosTorrentEnabled" formControlName="importVideosTorrentEnabled"
+        i18n-labelText labelText="Video import with a torrent file or a magnet URI enabled"
+      ></my-peertube-checkbox>
+
       <div i18n class="inner-form-title">Administrator</div>
 
       <div class="form-group">
         </div>
       </div>
 
-      <div class="form-group">
-        <input type="checkbox" id="servicesTwitterWhitelisted" formControlName="servicesTwitterWhitelisted">
-
-        <label for="servicesTwitterWhitelisted"></label>
-        <label i18n for="servicesTwitterWhitelisted">Instance whitelisted by Twitter</label>
-        <my-help
-          helpType="custom" i18n-customHtml
-          customHtml="If your instance is whitelisted by Twitter, a video player will be embedded in the Twitter feed on PeerTube video share.<br />
+      <my-peertube-checkbox
+        inputName="servicesTwitterWhitelisted" formControlName="servicesTwitterWhitelisted"
+        i18n-labelText labelText="Instance whitelisted by Twitter"
+        i18n-helpHtml helpHtml="If your instance is whitelisted by Twitter, a video player will be embedded in the Twitter feed on PeerTube video share.<br />
 If the instance is not whitelisted, we use an image link card that will redirect on your PeerTube instance.<br /><br />
 Check this checkbox, save the configuration and test with a video URL of your instance (https://example.com/videos/watch/blabla) on <a target='_blank' rel='noopener noreferrer' href='https://cards-dev.twitter.com/validator'>https://cards-dev.twitter.com/validator</a> to see if you instance is whitelisted."
-        ></my-help>
-
-      </div>
+      ></my-peertube-checkbox>
     </tab>
 
     <tab i18n-heading heading="Advanced configuration">
 
       <div i18n class="inner-form-title">Transcoding</div>
 
-      <div class="form-group">
-        <input type="checkbox" id="transcodingEnabled" formControlName="transcodingEnabled">
-
-        <label for="transcodingEnabled"></label>
-        <label i18n for="transcodingEnabled">Transcoding enabled</label>
-      </div>
+      <my-peertube-checkbox
+        inputName="transcodingEnabled" formControlName="transcodingEnabled"
+        i18n-labelText labelText="Transcoding enabled"
+        i18n-helpHtml helpHtml="If you disable transcoding, many videos from your users will not work!"
+      ></my-peertube-checkbox>
 
       <ng-template [ngIf]="isTranscodingEnabled()">
 
@@ -195,24 +198,25 @@ Check this checkbox, save the configuration and test with a video URL of your in
         </div>
 
         <div class="form-group" *ngFor="let resolution of resolutions">
-          <input
-              type="checkbox" [id]="getResolutionKey(resolution)"
-              [formControlName]="getResolutionKey(resolution)"
-          >
-          <label [for]="getResolutionKey(resolution)"></label>
-          <label i18n [for]="getResolutionKey(resolution)">Resolution {{ resolution }} enabled</label>
+          <my-peertube-checkbox
+            [inputName]="getResolutionKey(resolution)" [formControlName]="getResolutionKey(resolution)"
+            i18n-labelText labelText="Resolution {{resolution}} enabled"
+          ></my-peertube-checkbox>
+
         </div>
       </ng-template>
 
-      <div i18n class="inner-form-title">Cache</div>
+      <div i18n class="inner-form-title">
+        Cache
 
-      <div class="form-group">
-        <label i18n for="cachePreviewsSize">Previews cache size</label>
         <my-help
           helpType="custom" i18n-customHtml
-          customHtml="Previews are not federated. We fetch them directly from the origin instance and cache them."
+          customHtml="Some files are not federated (previews, captions). We fetch them directly from the origin instance and cache them."
         ></my-help>
+      </div>
 
+      <div class="form-group">
+        <label i18n for="cachePreviewsSize">Previews cache size</label>
         <input
           type="text" id="cachePreviewsSize"
           formControlName="cachePreviewsSize" [ngClass]="{ 'input-error': formErrors['cachePreviewsSize'] }"
@@ -222,6 +226,17 @@ Check this checkbox, save the configuration and test with a video URL of your in
         </div>
       </div>
 
+      <div class="form-group">
+        <label i18n for="cachePreviewsSize">Video captions cache size</label>
+        <input
+          type="text" id="cacheCaptionsSize"
+          formControlName="cacheCaptionsSize" [ngClass]="{ 'input-error': formErrors['cacheCaptionsSize'] }"
+        >
+        <div *ngIf="formErrors.cacheCaptionsSize" class="form-error">
+          {{ formErrors.cacheCaptionsSize }}
+        </div>
+      </div>
+
       <div i18n class="inner-form-title">Customizations</div>
 
       <div class="form-group">
@@ -272,4 +287,5 @@ Check this checkbox, save the configuration and test with a video URL of your in
   </tabset>
 
   <input (click)="formValidated()" type="submit" i18n-value value="Update configuration" [disabled]="!form.valid">
+  <span class="form-error" i18n *ngIf="!form.valid">It seems the configuration is invalid. Please search potential errors in the different tabs.</span>
 </form>