]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+videos/+video-edit/video-add-components/video-import-torrent.component.html
Migrate to $localize
[github/Chocobozzz/PeerTube.git] / client / src / app / +videos / +video-edit / video-add-components / video-import-torrent.component.html
CommitLineData
b9177868 1<div *ngIf="!hasImportedVideo" class="upload-video-container" dragDrop (fileDropped)="setTorrentFile($event)">
457bb213 2 <div class="first-step-block">
adcf9212 3 <my-global-icon class="upload-icon" iconName="upload" aria-hidden="true"></my-global-icon>
ce33919c 4
c9ff8a08 5 <div class="button-file form-control" [ngbTooltip]="'(extensions: .torrent)'">
990b6a0b
C
6 <span i18n>Select the torrent to import</span>
7 <input #torrentfileInput type="file" name="torrentfile" id="torrentfile" accept=".torrent" (change)="fileChange()" />
8 </div>
990b6a0b 9
c9ff8a08 10 <div class="torrent-or-magnet" i18n-data-content data-content="OR"></div>
990b6a0b
C
11
12 <div class="form-group form-group-magnet-uri">
13 <label i18n for="magnetUri">Paste magnet URI</label>
421d935d
C
14 <my-help>
15 <ng-template ptTemplate="customHtml">
16 <ng-container i18n>
17 You can import any torrent file that points to a mp4 file.
18 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.
19 </ng-container>
20 </ng-template>
21 </my-help>
ce33919c 22
c9ff8a08 23 <input type="text" id="magnetUri" [(ngModel)]="magnetUri" class="form-control" />
ce33919c
C
24 </div>
25
26 <div class="form-group">
27 <label i18n for="first-step-channel">Channel</label>
02c01341
RK
28 <my-select-channel
29 labelForId="first-step-channel" [items]="userVideoChannels" [(ngModel)]="firstStepChannelId"
30 ></my-select-channel>
ce33919c
C
31 </div>
32
33 <div class="form-group">
34 <label i18n for="first-step-privacy">Privacy</label>
02c01341
RK
35 <my-select-options
36 labelForId="first-step-privacy" [items]="videoPrivacies" [(ngModel)]="firstStepPrivacyId"
37 ></my-select-options>
ce33919c
C
38 </div>
39
40 <input
41 type="button" i18n-value value="Import"
42 [disabled]="!isMagnetUrlValid() || isImportingVideo" (click)="importVideo()"
43 />
44 </div>
45</div>
46
7373507f
C
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="hasImportedVideo && !error" class="alert alert-info" i18n>
ce33919c
C
53 Congratulations, the video will be imported with BitTorrent! 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"
ce33919c
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 >
c41c0e28 68 <my-global-icon iconName="circle-tick" aria-hidden="true"></my-global-icon>
ce33919c
C
69 <input type="button" i18n-value value="Update" />
70 </div>
71 </div>
72</form>