]>
Commit | Line | Data |
---|---|---|
9df52d66 | 1 | <div *ngIf="!isUploadingVideo" class="upload-video-container" myDragDrop (fileDropped)="onFileDropped($event)"> |
457bb213 | 2 | <div class="first-step-block"> |
adcf9212 | 3 | <my-global-icon class="upload-icon" iconName="upload" aria-hidden="true"></my-global-icon> |
fbad87b0 | 4 | |
c9ff8a08 | 5 | <div class="button-file form-control" [ngbTooltip]="'(extensions: ' + videoExtensions + ')'"> |
fbad87b0 | 6 | <span i18n>Select the file to upload</span> |
1916c966 | 7 | <input |
f6d6e7f8 | 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" | |
1916c966 | 15 | /> |
fbad87b0 | 16 | </div> |
fbad87b0 C |
17 | |
18 | <div class="form-group form-group-channel"> | |
19 | <label i18n for="first-step-channel">Channel</label> | |
02c01341 RK |
20 | <my-select-channel |
21 | labelForId="first-step-channel" [items]="userVideoChannels" [(ngModel)]="firstStepChannelId" | |
22 | ></my-select-channel> | |
fbad87b0 C |
23 | </div> |
24 | ||
25 | <div class="form-group"> | |
26 | <label i18n for="first-step-privacy">Privacy</label> | |
02c01341 RK |
27 | <my-select-options |
28 | labelForId="first-step-privacy" [items]="videoPrivacies" [(ngModel)]="firstStepPrivacyId" | |
29 | ></my-select-options> | |
fbad87b0 | 30 | </div> |
7b992a86 C |
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"> | |
f6d6e7f8 | 49 | <my-button |
50 | className="orange-button" | |
51 | [label]="getAudioUploadLabel()" | |
52 | icon="upload" | |
53 | (click)="uploadAudio()" | |
54 | > | |
55 | </my-button> | |
7b992a86 C |
56 | </div> |
57 | </ng-container> | |
fbad87b0 C |
58 | </div> |
59 | </div> | |
60 | ||
d4132d3f | 61 | <!-- Upload progress/cancel/error/success header --> |
7373507f | 62 | <div *ngIf="isUploadingVideo && !error" class="upload-progress-cancel"> |
d4132d3f | 63 | <div class="progress" i18n-title title="Total video uploaded"> |
e61151b0 RK |
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> | |
41e59dbe C |
69 | <input |
70 | *ngIf="videoUploaded === false" | |
71 | type="button" class="peertube-button grey-button ms-1" i18n-value="Cancel ongoing upload of a video" value="Cancel" (click)="cancelUpload()" | |
72 | /> | |
fbad87b0 C |
73 | </div> |
74 | ||
d4132d3f RK |
75 | <div *ngIf="error && enableRetryAfterError" class="upload-progress-retry"> |
76 | <div class="progress"> | |
77 | <div class="progress-bar red" role="progressbar" [style]="{ width: '100%' }" [attr.aria-valuenow]="100" aria-valuemin="0" [attr.aria-valuemax]="100"> | |
78 | <span>{{ error }}</span> | |
79 | </div> | |
80 | </div> | |
f6d6e7f8 | 81 | |
672e185b C |
82 | <input type="button" class="peertube-button grey-button ms-1" i18n-value="Retry failed upload of a video" value="Retry" (click)="retryUpload()" /> |
83 | <input type="button" class="peertube-button grey-button ms-1" i18n-value="Cancel ongoing upload of a video" value="Cancel" (click)="cancelUpload()" /> | |
d4132d3f RK |
84 | </div> |
85 | ||
86 | <div *ngIf="error && !enableRetryAfterError" class="alert alert-danger"> | |
7373507f C |
87 | <div i18n>Sorry, but something went wrong</div> |
88 | {{ error }} | |
89 | </div> | |
90 | ||
b13a0a48 | 91 | <div *ngIf="videoUploaded && !error" class="alert pt-alert-primary" i18n> |
674a66bb C |
92 | Congratulations! Your video is now available in your private library. |
93 | </div> | |
94 | ||
fbad87b0 | 95 | <!-- Hidden because we want to load the component --> |
df8914c9 | 96 | <form [hidden]="!isUploadingVideo" novalidate [formGroup]="form" class="mb-3"> |
fbad87b0 C |
97 | <my-video-edit |
98 | [form]="form" [formErrors]="formErrors" [videoCaptions]="videoCaptions" | |
851f5daa | 99 | [validationMessages]="validationMessages" [userVideoChannels]="userVideoChannels" |
080f1402 | 100 | [forbidScheduledPublication]="false" |
7294aab0 | 101 | type="upload" |
fbad87b0 C |
102 | ></my-video-edit> |
103 | ||
104 | <div class="submit-container"> | |
105 | <div i18n *ngIf="videoUploaded === false" class="message-submit">Publish will be available when upload is finished</div> | |
106 | ||
1ef7f323 | 107 | <my-button className="orange-button" i18n-label label="Publish" icon="circle-tick" |
1fe1e14c RK |
108 | (click)="updateSecondStep()" (keydown.enter)="updateSecondStep()" |
109 | [disabled]="isPublishingButtonDisabled()" | |
110 | ></my-button> | |
fbad87b0 | 111 | </div> |
7373507f | 112 | </form> |