]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/videos/+video-edit/video-add-components/video-import-url.component.html
Add ability to unpublish video/playlist
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / +video-edit / video-add-components / video-import-url.component.html
CommitLineData
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>
299474e8
C
7 <my-help
8 helpType="custom" i18n-customHtml
60979b07 9 customHtml="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> or URL that points to a raw MP4 file. 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."
299474e8
C
10 ></my-help>
11
fbad87b0
C
12 <input type="text" id="targetUrl" [(ngModel)]="targetUrl" />
13 </div>
14
15 <div class="form-group">
16 <label i18n for="first-step-channel">Channel</label>
17 <div class="peertube-select-container">
18 <select id="first-step-channel" [(ngModel)]="firstStepChannelId">
19 <option *ngFor="let channel of userVideoChannels" [value]="channel.id">{{ channel.label }}</option>
20 </select>
21 </div>
22 </div>
23
24 <div class="form-group">
25 <label i18n for="first-step-privacy">Privacy</label>
26 <div class="peertube-select-container">
27 <select id="first-step-privacy" [(ngModel)]="firstStepPrivacyId">
28 <option *ngFor="let privacy of videoPrivacies" [value]="privacy.id">{{ privacy.label }}</option>
29 </select>
30 </div>
31 </div>
32
33 <input
34 type="button" i18n-value value="Import"
35 [disabled]="!isTargetUrlValid() || isImportingVideo" (click)="importVideo()"
36 />
37 </div>
38</div>
39
7373507f
C
40
41<div *ngIf="error" class="alert alert-danger">
42 <div i18n>Sorry, but something went wrong</div>
43 {{ error }}
44</div>
45
46<div *ngIf="!error && hasImportedVideo" class="alert alert-info" i18n>
fbad87b0
C
47 Congratulations, the video behind {{ targetUrl }} will be imported! You can already add information about this video.
48</div>
49
50<!-- Hidden because we want to load the component -->
51<form [hidden]="!hasImportedVideo" novalidate [formGroup]="form">
52 <my-video-edit
53 [form]="form" [formErrors]="formErrors" [videoCaptions]="videoCaptions" [schedulePublicationPossible]="false"
71d00bfd 54 [validationMessages]="validationMessages" [videoPrivacies]="explainedVideoPrivacies" [userVideoChannels]="userVideoChannels"
fbad87b0
C
55 ></my-video-edit>
56
57 <div class="submit-container">
58 <div class="submit-button"
59 (click)="updateSecondStep()"
60 [ngClass]="{ disabled: !form.valid || isUpdatingVideo === true }"
61 >
457bb213 62 <my-global-icon iconName="validate"></my-global-icon>
fbad87b0
C
63 <input type="button" i18n-value value="Update" />
64 </div>
65 </div>
66</form>