]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+videos/+video-edit/video-add-components/video-upload.component.html
Refactor modal buttons style
[github/Chocobozzz/PeerTube.git] / client / src / app / +videos / +video-edit / video-add-components / video-upload.component.html
CommitLineData
b9177868 1<div *ngIf="!isUploadingVideo" class="upload-video-container" dragDrop (fileDropped)="setVideoFile($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
C
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 />
fbad87b0 11 </div>
fbad87b0
C
12
13 <div class="form-group form-group-channel">
14 <label i18n for="first-step-channel">Channel</label>
02c01341
RK
15 <my-select-channel
16 labelForId="first-step-channel" [items]="userVideoChannels" [(ngModel)]="firstStepChannelId"
17 ></my-select-channel>
fbad87b0
C
18 </div>
19
20 <div class="form-group">
21 <label i18n for="first-step-privacy">Privacy</label>
02c01341
RK
22 <my-select-options
23 labelForId="first-step-privacy" [items]="videoPrivacies" [(ngModel)]="firstStepPrivacyId"
24 ></my-select-options>
fbad87b0 25 </div>
7b992a86
C
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>
fbad87b0
C
47 </div>
48</div>
49
d4132d3f 50<!-- Upload progress/cancel/error/success header -->
7373507f 51<div *ngIf="isUploadingVideo && !error" class="upload-progress-cancel">
d4132d3f 52 <div class="progress" i18n-title title="Total video uploaded">
e61151b0
RK
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>
d4132d3f 58 <input *ngIf="videoUploaded === false" type="button" i18n-value="Cancel ongoing upload of a video" value="Cancel" (click)="cancelUpload()" />
fbad87b0
C
59</div>
60
d4132d3f
RK
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">
7373507f
C
74 <div i18n>Sorry, but something went wrong</div>
75 {{ error }}
76</div>
77
674a66bb
C
78<div *ngIf="videoUploaded && !error" class="alert alert-info" i18n>
79 Congratulations! Your video is now available in your private library.
80</div>
81
fbad87b0 82<!-- Hidden because we want to load the component -->
df8914c9 83<form [hidden]="!isUploadingVideo" novalidate [formGroup]="form" class="mb-3">
fbad87b0
C
84 <my-video-edit
85 [form]="form" [formErrors]="formErrors" [videoCaptions]="videoCaptions"
851f5daa 86 [validationMessages]="validationMessages" [userVideoChannels]="userVideoChannels"
ddb62a85 87 [waitTranscodingEnabled]="true"
7294aab0 88 type="upload"
fbad87b0
C
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
1ef7f323 94 <my-button className="orange-button" i18n-label label="Publish" icon="circle-tick"
1fe1e14c
RK
95 (click)="updateSecondStep()" (keydown.enter)="updateSecondStep()"
96 [disabled]="isPublishingButtonDisabled()"
97 ></my-button>
fbad87b0 98 </div>
7373507f 99</form>