]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/videos/+video-edit/video-add.component.html
Add tests regarding video import
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / +video-edit / video-add.component.html
index 6dcf5bf7553534ade14c77740c49a84431299d7c..1575007d276142007949f504d73a9d196931a8e5 100644 (file)
@@ -1,62 +1,17 @@
 <div class="margin-content">
   <div class="title-page title-page-single">
-    Upload your video
+    <ng-container *ngIf="secondStepType === 'import'" i18n>Import {{ videoName }}</ng-container>
+    <ng-container *ngIf="secondStepType === 'upload'" i18n>Upload {{ videoName }}</ng-container>
   </div>
 
-  <div *ngIf="!isUploadingVideo" class="upload-video-container">
-    <div class="upload-video">
-      <div class="icon icon-upload"></div>
+  <tabset class="video-add-tabset root-tabset bootstrap" [ngClass]="{ 'hide-nav': secondStepType !== undefined }">
 
-      <div class="button-file">
-        <span>Select the file to upload</span>
-        <input #videofileInput type="file" name="videofile" id="videofile" [accept]="videoExtensions" (change)="fileChange()" />
-      </div>
+    <tab i18n-heading heading="Upload your video">
+      <my-video-upload #videoUpload (firstStepDone)="onFirstStepDone('upload', $event)"></my-video-upload>
+    </tab>
 
-      <div class="form-group form-group-channel">
-        <label 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">
-        <label 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>
-          </select>
-        </div>
-      </div>
-    </div>
-  </div>
-
-  <div *ngIf="isUploadingVideo" class="upload-progress-cancel">
-    <p-progressBar
-      [value]="videoUploadPercents"
-      [ngClass]="{ processing: videoUploadPercents === 100 && videoUploaded === false }"
-    ></p-progressBar>
-    <input *ngIf="videoUploaded === false" type="button" value="Cancel" (click)="cancelUpload()" />
-  </div>
-
-  <!-- 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" [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 class="submit-button"
-         (click)="updateSecondStep()"
-         [ngClass]="{ disabled: !form.valid || isUpdatingVideo === true || videoUploaded !== true }"
-      >
-        <span class="icon icon-validate"></span>
-        <input type="button" value="Publish" />
-      </div>
-    </div>
-  </form>
+    <tab *ngIf="isVideoImportEnabled()" i18n-heading heading="Import your video">
+      <my-video-import #videoImport (firstStepDone)="onFirstStepDone('import', $event)"></my-video-import>
+    </tab>
+  </tabset>
 </div>