]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/videos/+video-edit/video-add-components/video-import-torrent.component.html
Merge branch 'develop' of https://github.com/Chocobozzz/PeerTube into move-utils...
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / +video-edit / video-add-components / video-import-torrent.component.html
CommitLineData
ce33919c
C
1<div *ngIf="!hasImportedVideo" class="upload-video-container">
2 <div class="import-video-torrent">
3 <div class="icon icon-upload"></div>
4
990b6a0b
C
5 <div class="button-file">
6 <span i18n>Select the torrent to import</span>
7 <input #torrentfileInput type="file" name="torrentfile" id="torrentfile" accept=".torrent" (change)="fileChange()" />
8 </div>
9 <span class="button-file-extension">(.torrent)</span>
10
baf0a8c9 11 <div class="torrent-or-magnet" i18n>Or</div>
990b6a0b
C
12
13 <div class="form-group form-group-magnet-uri">
14 <label i18n for="magnetUri">Paste magnet URI</label>
ce33919c
C
15 <my-help
16 helpType="custom" i18n-customHtml
17 customHtml="You can import any torrent file that points to a 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."
18 ></my-help>
19
20 <input type="text" id="magnetUri" [(ngModel)]="magnetUri" />
21 </div>
22
23 <div class="form-group">
24 <label i18n for="first-step-channel">Channel</label>
25 <div class="peertube-select-container">
26 <select id="first-step-channel" [(ngModel)]="firstStepChannelId">
27 <option *ngFor="let channel of userVideoChannels" [value]="channel.id">{{ channel.label }}</option>
28 </select>
29 </div>
30 </div>
31
32 <div class="form-group">
33 <label i18n for="first-step-privacy">Privacy</label>
34 <div class="peertube-select-container">
35 <select id="first-step-privacy" [(ngModel)]="firstStepPrivacyId">
36 <option *ngFor="let privacy of videoPrivacies" [value]="privacy.id">{{ privacy.label }}</option>
37 </select>
38 </div>
39 </div>
40
41 <input
42 type="button" i18n-value value="Import"
43 [disabled]="!isMagnetUrlValid() || isImportingVideo" (click)="importVideo()"
44 />
45 </div>
46</div>
47
7373507f
C
48<div *ngIf="error" class="alert alert-danger">
49 <div i18n>Sorry, but something went wrong</div>
50 {{ error }}
51</div>
52
53<div *ngIf="hasImportedVideo && !error" class="alert alert-info" i18n>
ce33919c
C
54 Congratulations, the video will be imported with BitTorrent! You can already add information about this video.
55</div>
56
57<!-- Hidden because we want to load the component -->
58<form [hidden]="!hasImportedVideo" novalidate [formGroup]="form">
59 <my-video-edit
60 [form]="form" [formErrors]="formErrors" [videoCaptions]="videoCaptions" [schedulePublicationPossible]="false"
61 [validationMessages]="validationMessages" [videoPrivacies]="videoPrivacies" [userVideoChannels]="userVideoChannels"
62 ></my-video-edit>
63
64 <div class="submit-container">
65 <div class="submit-button"
66 (click)="updateSecondStep()"
67 [ngClass]="{ disabled: !form.valid || isUpdatingVideo === true }"
68 >
69 <span class="icon icon-validate"></span>
70 <input type="button" i18n-value value="Update" />
71 </div>
72 </div>
73</form>