]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/+videos/+video-edit/video-add-components/video-upload.component.html
Add ability to set custom field to video form
[github/Chocobozzz/PeerTube.git] / client / src / app / +videos / +video-edit / video-add-components / video-upload.component.html
1 <div *ngIf="!isUploadingVideo" class="upload-video-container" dragDrop (fileDropped)="setVideoFile($event)">
2 <div class="first-step-block">
3 <my-global-icon class="upload-icon" iconName="upload" aria-hidden="true"></my-global-icon>
4
5 <div class="button-file form-control" [ngbTooltip]="'(extensions: ' + videoExtensions + ')'">
6 <span i18n>Select the file to upload</span>
7 <input #videofileInput type="file" name="videofile" id="videofile" [accept]="videoExtensions" (change)="fileChange()" autofocus />
8 </div>
9
10 <div class="form-group form-group-channel">
11 <label i18n for="first-step-channel">Channel</label>
12 <my-select-channel
13 labelForId="first-step-channel" [items]="userVideoChannels" [(ngModel)]="firstStepChannelId"
14 ></my-select-channel>
15 </div>
16
17 <div class="form-group">
18 <label i18n for="first-step-privacy">Privacy</label>
19 <my-select-options
20 labelForId="first-step-privacy" [items]="videoPrivacies" [(ngModel)]="firstStepPrivacyId"
21 ></my-select-options>
22 </div>
23
24 <ng-container *ngIf="isUploadingAudioFile">
25 <div class="form-group audio-preview">
26 <label i18n for="previewfileUpload">Video background image</label>
27
28 <div i18n class="audio-image-info">
29 Image that will be merged with your audio file.
30 <br />
31 The chosen image will be definitive and cannot be modified.
32 </div>
33
34 <my-preview-upload
35 i18n-inputLabel inputLabel="Edit" inputName="previewfileUpload" [(ngModel)]="previewfileUpload"
36 previewWidth="360px" previewHeight="200px"
37 ></my-preview-upload>
38 </div>
39
40 <div class="form-group upload-audio-button">
41 <my-button className="orange-button" i18n-label [label]="getAudioUploadLabel()" icon="upload" (click)="uploadFirstStep(true)"></my-button>
42 </div>
43 </ng-container>
44 </div>
45 </div>
46
47 <div *ngIf="isUploadingVideo && !error" class="upload-progress-cancel">
48 <div class="progress" i18n-title title="Total video quota">
49 <div class="progress-bar" role="progressbar" [style]="{ width: videoUploadPercents + '%' }" [attr.aria-valuenow]="videoUploadPercents" aria-valuemin="0" [attr.aria-valuemax]="100">
50 <span *ngIf="videoUploadPercents === 100 && videoUploaded === false" i18n>Processing…</span>
51 <span *ngIf="videoUploadPercents !== 100 || videoUploaded">{{ videoUploadPercents }}%</span>
52 </div>
53 </div>
54 <input *ngIf="videoUploaded === false" type="button" value="Cancel" (click)="cancelUpload()" />
55 </div>
56
57 <div *ngIf="error" class="alert alert-danger">
58 <div i18n>Sorry, but something went wrong</div>
59 {{ error }}
60 </div>
61
62 <div *ngIf="videoUploaded && !error" class="alert alert-info" i18n>
63 Congratulations! Your video is now available in your private library.
64 </div>
65
66 <!-- Hidden because we want to load the component -->
67 <form [hidden]="!isUploadingVideo" novalidate [formGroup]="form" class="mb-3">
68 <my-video-edit
69 [form]="form" [formErrors]="formErrors" [videoCaptions]="videoCaptions"
70 [validationMessages]="validationMessages" [userVideoChannels]="userVideoChannels"
71 [waitTranscodingEnabled]="waitTranscodingEnabled"
72 type="upload"
73 ></my-video-edit>
74
75 <div class="submit-container">
76 <div i18n *ngIf="videoUploaded === false" class="message-submit">Publish will be available when upload is finished</div>
77
78 <my-button className="submit-button orange-button" i18n-label label="Publish" icon="circle-tick"
79 (click)="updateSecondStep()" (keydown.enter)="updateSecondStep()"
80 [disabled]="isPublishingButtonDisabled()"
81 ></my-button>
82 </div>
83 </form>