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