]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/videos/+video-edit/video-add.component.html
Fix videos add tabs style
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / +video-edit / video-add.component.html
index 20277423c8bbaa2b048ba023f538c8a15371c50e..e14e23aeded894f6ffec55a68e2e2e11db278aff 100644 (file)
@@ -1,59 +1,30 @@
 <div class="margin-content">
   <div class="title-page title-page-single">
-    Upload your video
+    <ng-container *ngIf="secondStepType === 'import-url' || secondStepType === 'import-torrent'" i18n>Import {{ videoName }}</ng-container>
+    <ng-container *ngIf="secondStepType === 'upload'" i18n>Upload {{ videoName }}</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()" />
-      </div>
-
-      <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>
-
-  <p-progressBar
-      *ngIf="isUploadingVideo" [value]="videoUploadPercents"
-      [ngClass]="{ processing: videoUploadPercents === 100 && videoUploaded === false }"
-  ></p-progressBar>
-
-  <!-- Hidden because we need 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 || videoUploaded !== true }">
-        <span class="icon icon-validate"></span>
-        <input type="button" value="Publish" />
-      </div>
-    </div>
-  </form>
+  <ngb-tabset class="video-add-tabset root-tabset bootstrap" [ngClass]="{ 'hide-nav': secondStepType !== undefined }">
+
+    <ngb-tab i18n-title title="">
+      <ng-template ngbTabTitle><span i18n>Upload a file</span></ng-template>
+      <ng-template ngbTabContent>
+        <my-video-upload #videoUpload (firstStepDone)="onFirstStepDone('upload', $event)"></my-video-upload>
+      </ng-template>
+    </ngb-tab>
+
+    <ngb-tab *ngIf="isVideoImportHttpEnabled()">
+      <ng-template ngbTabTitle><span i18n>Import with URL</span></ng-template>
+      <ng-template ngbTabContent>
+        <my-video-import-url #videoImportUrl (firstStepDone)="onFirstStepDone('import-url', $event)"></my-video-import-url>
+      </ng-template>
+    </ngb-tab>
+
+    <ngb-tab *ngIf="isVideoImportTorrentEnabled()">
+      <ng-template ngbTabTitle><span i18n>Import with torrent</span></ng-template>
+      <ng-template ngbTabContent>
+        <my-video-import-torrent #videoImportTorrent (firstStepDone)="onFirstStepDone('import-torrent', $event)"></my-video-import-torrent>
+      </ng-template>
+    </ngb-tab>
+  </ngb-tabset>
 </div>