]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/+videos/+video-edit/video-add-components/video-import-url.component.html
2107dc9d0c6abfbe60720a588165aaa6927d2da2
[github/Chocobozzz/PeerTube.git] / client / src / app / +videos / +video-edit / video-add-components / video-import-url.component.html
1 <div *ngIf="!hasImportedVideo" class="upload-video-container">
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="form-group">
6 <label i18n for="targetUrl">URL</label>
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 media 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>
17
18 <input type="text" id="targetUrl" [(ngModel)]="targetUrl" class="form-control" />
19 </div>
20
21 <div class="form-group">
22 <label i18n for="first-step-channel">Channel</label>
23 <my-select-channel
24 labelForId="first-step-channel" [items]="userVideoChannels" [(ngModel)]="firstStepChannelId"
25 ></my-select-channel>
26 </div>
27
28 <div class="form-group">
29 <label i18n for="first-step-privacy">Privacy</label>
30 <my-select-options
31 labelForId="first-step-privacy" [items]="videoPrivacies" [(ngModel)]="firstStepPrivacyId"
32 ></my-select-options>
33 </div>
34
35 <input
36 type="button" i18n-value value="Import"
37 [disabled]="!isTargetUrlValid() || isImportingVideo" (click)="importVideo()"
38 />
39 </div>
40 </div>
41
42
43 <div *ngIf="error" class="alert alert-danger">
44 <div i18n>Sorry, but something went wrong</div>
45 {{ error }}
46 </div>
47
48 <div *ngIf="!error && hasImportedVideo" class="alert alert-info" i18n>
49 Congratulations, the video behind {{ targetUrl }} will be imported! You can already add information about this video.
50 </div>
51
52 <!-- Hidden because we want to load the component -->
53 <form [hidden]="!hasImportedVideo" novalidate [formGroup]="form">
54 <my-video-edit
55 [form]="form" [formErrors]="formErrors" [videoCaptions]="videoCaptions" [schedulePublicationPossible]="false"
56 [validationMessages]="validationMessages" [userVideoChannels]="userVideoChannels"
57 ></my-video-edit>
58
59 <div class="submit-container">
60 <div class="submit-button"
61 (click)="updateSecondStep()"
62 [ngClass]="{ disabled: !form.valid || isUpdatingVideo === true }"
63 >
64 <my-global-icon iconName="circle-tick" aria-hidden="true"></my-global-icon>
65 <input type="button" i18n-value value="Update" />
66 </div>
67 </div>
68 </form>