Implement captions/subtitles
[oweals/peertube.git] / client / src / app / videos / +video-edit / video-add.component.html
1 <div class="margin-content">
2   <div class="title-page title-page-single">
3     <ng-container *ngIf="!videoFileName" i18n>Upload your video</ng-container>
4     <ng-container *ngIf="videoFileName" i18n>Upload {{ videoFileName }}</ng-container>
5   </div>
6
7   <div *ngIf="!isUploadingVideo" class="upload-video-container">
8     <div class="upload-video">
9       <div class="icon icon-upload"></div>
10
11       <div class="button-file">
12         <span i18n>Select the file to upload</span>
13         <input #videofileInput type="file" name="videofile" id="videofile" [accept]="videoExtensions" (change)="fileChange()" />
14       </div>
15       <span class="button-file-extension">(.mp4, .webm, .ogv)</span>
16
17       <div class="form-group form-group-channel">
18         <label i18n for="first-step-channel">Channel</label>
19         <div class="peertube-select-container">
20           <select id="first-step-channel" [(ngModel)]="firstStepChannelId">
21             <option *ngFor="let channel of userVideoChannels" [value]="channel.id">{{ channel.label }}</option>
22           </select>
23         </div>
24       </div>
25
26       <div class="form-group">
27         <label i18n for="first-step-privacy">Privacy</label>
28         <div class="peertube-select-container">
29           <select id="first-step-privacy" [(ngModel)]="firstStepPrivacyId">
30             <option *ngFor="let privacy of videoPrivacies" [value]="privacy.id">{{ privacy.label }}</option>
31             <option [value]="SPECIAL_SCHEDULED_PRIVACY">Scheduled</option>
32           </select>
33         </div>
34       </div>
35     </div>
36   </div>
37
38   <div *ngIf="isUploadingVideo" class="upload-progress-cancel">
39     <p-progressBar
40       [value]="videoUploadPercents"
41       [ngClass]="{ processing: videoUploadPercents === 100 && videoUploaded === false }"
42     ></p-progressBar>
43     <input *ngIf="videoUploaded === false" type="button" value="Cancel" (click)="cancelUpload()" />
44   </div>
45
46   <!-- Hidden because we want to load the component -->
47   <form [hidden]="!isUploadingVideo" novalidate [formGroup]="form">
48     <my-video-edit
49       [form]="form" [formErrors]="formErrors" [videoCaptions]="videoCaptions"
50       [validationMessages]="validationMessages" [videoPrivacies]="videoPrivacies" [userVideoChannels]="userVideoChannels"
51     ></my-video-edit>
52
53     <div class="submit-container">
54       <div i18n *ngIf="videoUploaded === false" class="message-submit">Publish will be available when upload is finished</div>
55
56       <div class="submit-button"
57          (click)="updateSecondStep()"
58          [ngClass]="{ disabled: !form.valid || isUpdatingVideo === true || videoUploaded !== true }"
59       >
60         <span class="icon icon-validate"></span>
61         <input type="button" i18n-value value="Publish" />
62       </div>
63     </div>
64   </form>
65 </div>