]>
Commit | Line | Data |
---|---|---|
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 | ||
48 | <div *ngIf="hasImportedVideo" class="alert alert-info" i18n> | |
49 | Congratulations, the video will be imported with BitTorrent! 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" [videoPrivacies]="videoPrivacies" [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 | <span class="icon icon-validate"></span> | |
65 | <input type="button" i18n-value value="Update" /> | |
66 | </div> | |
67 | </div> | |
68 | </form> |