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