]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/videos/+video-edit/video-add.component.html
Change friendly reminder about privacy.
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / +video-edit / video-add.component.html
index a6f2bf6f28e50146e2b8858bd7a7d6f528a63dc8..7d9443209c0e0f084014eee2e422d0a9ef24fa68 100644 (file)
@@ -1,52 +1,64 @@
 <div class="margin-content">
   <div class="title-page title-page-single">
-    Upload your video
+    <ng-container *ngIf="!videoFileName" i18n>Upload your video</ng-container>
+    <ng-container *ngIf="videoFileName" i18n>Upload {{ videoFileName }}</ng-container>
   </div>
 
-  <div *ngIf="error" class="alert alert-danger">{{ error }}</div>
-
   <div *ngIf="!isUploadingVideo" class="upload-video-container">
     <div class="upload-video">
       <div class="icon icon-upload"></div>
 
       <div class="button-file">
-        <span>Select the file to upload</span>
-        <input #videofileInput type="file" name="videofile" id="videofile" (change)="fileChange()" />
+        <span i18n>Select the file to upload</span>
+        <input #videofileInput type="file" name="videofile" id="videofile" [accept]="videoExtensions" (change)="fileChange()" />
       </div>
+      <span class="button-file-extension">(.mp4, .webm, .ogv)</span>
 
-      <div class="form-group">
-        <select [(ngModel)]="firstStepPrivacyId">
-          <option *ngFor="let privacy of videoPrivacies" [value]="privacy.id">{{ privacy.label }}</option>
-        </select>
+      <div class="form-group form-group-channel">
+        <label i18n for="first-step-channel">Channel</label>
+        <div class="peertube-select-container">
+          <select id="first-step-channel" [(ngModel)]="firstStepChannelId">
+            <option *ngFor="let channel of userVideoChannels" [value]="channel.id">{{ channel.label }}</option>
+          </select>
+        </div>
       </div>
 
       <div class="form-group">
-        <select [(ngModel)]="firstStepChannelId">
-          <option *ngFor="let channel of userVideoChannels" [value]="channel.id">{{ channel.label }}</option>
-        </select>
+        <label i18n for="first-step-privacy">Privacy</label>
+        <div class="peertube-select-container">
+          <select id="first-step-privacy" [(ngModel)]="firstStepPrivacyId">
+            <option *ngFor="let privacy of videoPrivacies" [value]="privacy.id">{{ privacy.label }}</option>
+            <option [value]="SPECIAL_SCHEDULED_PRIVACY">Scheduled</option>
+          </select>
+        </div>
       </div>
     </div>
   </div>
 
-  <p-progressBar
-      *ngIf="isUploadingVideo" [value]="videoUploadPercents"
+  <div *ngIf="isUploadingVideo" class="upload-progress-cancel">
+    <p-progressBar
+      [value]="videoUploadPercents"
       [ngClass]="{ processing: videoUploadPercents === 100 && videoUploaded === false }"
-  ></p-progressBar>
+    ></p-progressBar>
+    <input *ngIf="videoUploaded === false" type="button" value="Cancel" (click)="cancelUpload()" />
+  </div>
 
-  <!-- Hidden because we need to load the component -->
+  <!-- Hidden because we want to load the component -->
   <form [hidden]="!isUploadingVideo" novalidate [formGroup]="form">
     <my-video-edit
-        [form]="form" [formErrors]="formErrors"
-        [validationMessages]="validationMessages" [videoPrivacies]="videoPrivacies"
+      [form]="form" [formErrors]="formErrors"
+      [validationMessages]="validationMessages" [videoPrivacies]="videoPrivacies" [userVideoChannels]="userVideoChannels"
     ></my-video-edit>
 
-
     <div class="submit-container">
-      <div *ngIf="videoUploaded === false" class="message-submit">Publish will be available when upload is finished</div>
+      <div i18n *ngIf="videoUploaded === false" class="message-submit">Publish will be available when upload is finished</div>
 
-      <div class="submit-button" (click)="updateSecondStep()" [ngClass]="{ disabled: !form.valid || videoUploaded !== true }">
+      <div class="submit-button"
+         (click)="updateSecondStep()"
+         [ngClass]="{ disabled: !form.valid || isUpdatingVideo === true || videoUploaded !== true }"
+      >
         <span class="icon icon-validate"></span>
-        <input type="button" value="Publish" />
+        <input type="button" i18n-value value="Publish" />
       </div>
     </div>
   </form>