]>
Commit | Line | Data |
---|---|---|
fbad87b0 | 1 | <div *ngIf="!hasImportedVideo" class="upload-video-container"> |
457bb213 C |
2 | <div class="first-step-block"> |
3 | <my-global-icon class="upload-icon" iconName="upload"></my-global-icon> | |
fbad87b0 C |
4 | |
5 | <div class="form-group"> | |
6 | <label i18n for="targetUrl">URL</label> | |
421d935d C |
7 | |
8 | <my-help> | |
9 | <ng-template ptTemplate="customHtml"> | |
10 | <ng-container i18n> | |
11 | You can import any URL <a href='https://rg3.github.io/youtube-dl/supportedsites.html' target='_blank' rel='noopener noreferrer'>supported by youtube-dl</a> | |
12 | or URL that points to a raw MP4 file. | |
13 | You should make sure you have diffusion rights over the content it points to, otherwise it could cause legal trouble to yourself and your instance. | |
14 | </ng-container> | |
15 | </ng-template> | |
16 | </my-help> | |
299474e8 | 17 | |
fbad87b0 C |
18 | <input type="text" id="targetUrl" [(ngModel)]="targetUrl" /> |
19 | </div> | |
20 | ||
21 | <div class="form-group"> | |
22 | <label i18n for="first-step-channel">Channel</label> | |
23 | <div class="peertube-select-container"> | |
24 | <select id="first-step-channel" [(ngModel)]="firstStepChannelId"> | |
25 | <option *ngFor="let channel of userVideoChannels" [value]="channel.id">{{ channel.label }}</option> | |
26 | </select> | |
27 | </div> | |
28 | </div> | |
29 | ||
30 | <div class="form-group"> | |
31 | <label i18n for="first-step-privacy">Privacy</label> | |
32 | <div class="peertube-select-container"> | |
33 | <select id="first-step-privacy" [(ngModel)]="firstStepPrivacyId"> | |
34 | <option *ngFor="let privacy of videoPrivacies" [value]="privacy.id">{{ privacy.label }}</option> | |
35 | </select> | |
36 | </div> | |
37 | </div> | |
38 | ||
39 | <input | |
40 | type="button" i18n-value value="Import" | |
41 | [disabled]="!isTargetUrlValid() || isImportingVideo" (click)="importVideo()" | |
42 | /> | |
43 | </div> | |
44 | </div> | |
45 | ||
7373507f C |
46 | |
47 | <div *ngIf="error" class="alert alert-danger"> | |
48 | <div i18n>Sorry, but something went wrong</div> | |
49 | {{ error }} | |
50 | </div> | |
51 | ||
52 | <div *ngIf="!error && hasImportedVideo" class="alert alert-info" i18n> | |
fbad87b0 C |
53 | Congratulations, the video behind {{ targetUrl }} will be imported! You can already add information about this video. |
54 | </div> | |
55 | ||
56 | <!-- Hidden because we want to load the component --> | |
57 | <form [hidden]="!hasImportedVideo" novalidate [formGroup]="form"> | |
58 | <my-video-edit | |
59 | [form]="form" [formErrors]="formErrors" [videoCaptions]="videoCaptions" [schedulePublicationPossible]="false" | |
851f5daa | 60 | [validationMessages]="validationMessages" [userVideoChannels]="userVideoChannels" |
fbad87b0 C |
61 | ></my-video-edit> |
62 | ||
63 | <div class="submit-container"> | |
64 | <div class="submit-button" | |
65 | (click)="updateSecondStep()" | |
66 | [ngClass]="{ disabled: !form.valid || isUpdatingVideo === true }" | |
67 | > | |
457bb213 | 68 | <my-global-icon iconName="validate"></my-global-icon> |
fbad87b0 C |
69 | <input type="button" i18n-value value="Update" /> |
70 | </div> | |
71 | </div> | |
72 | </form> |