]>
Commit | Line | Data |
---|---|---|
9df52d66 | 1 | <div *ngIf="!hasImportedVideo" class="upload-video-container" myDragDrop (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 | 6 | <span i18n>Select the torrent to import</span> |
1916c966 C |
7 | <input |
8 | aria-label="Select the torrent to import" i18n-aria-label | |
9 | #torrentfileInput type="file" name="torrentfile" id="torrentfile" accept=".torrent" (change)="fileChange()" | |
10 | /> | |
990b6a0b | 11 | </div> |
990b6a0b | 12 | |
c9ff8a08 | 13 | <div class="torrent-or-magnet" i18n-data-content data-content="OR"></div> |
990b6a0b C |
14 | |
15 | <div class="form-group form-group-magnet-uri"> | |
16 | <label i18n for="magnetUri">Paste magnet URI</label> | |
421d935d C |
17 | <my-help> |
18 | <ng-template ptTemplate="customHtml"> | |
19 | <ng-container i18n> | |
1c840ca4 | 20 | You can import any torrent file that points to a media file. |
421d935d C |
21 | 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. |
22 | </ng-container> | |
23 | </ng-template> | |
24 | </my-help> | |
ce33919c | 25 | |
c9ff8a08 | 26 | <input type="text" id="magnetUri" [(ngModel)]="magnetUri" class="form-control" /> |
ce33919c C |
27 | </div> |
28 | ||
29 | <div class="form-group"> | |
30 | <label i18n for="first-step-channel">Channel</label> | |
02c01341 RK |
31 | <my-select-channel |
32 | labelForId="first-step-channel" [items]="userVideoChannels" [(ngModel)]="firstStepChannelId" | |
33 | ></my-select-channel> | |
ce33919c C |
34 | </div> |
35 | ||
36 | <div class="form-group"> | |
37 | <label i18n for="first-step-privacy">Privacy</label> | |
02c01341 RK |
38 | <my-select-options |
39 | labelForId="first-step-privacy" [items]="videoPrivacies" [(ngModel)]="firstStepPrivacyId" | |
40 | ></my-select-options> | |
ce33919c C |
41 | </div> |
42 | ||
43 | <input | |
44 | type="button" i18n-value value="Import" | |
45 | [disabled]="!isMagnetUrlValid() || isImportingVideo" (click)="importVideo()" | |
46 | /> | |
47 | </div> | |
48 | </div> | |
49 | ||
7373507f C |
50 | <div *ngIf="error" class="alert alert-danger"> |
51 | <div i18n>Sorry, but something went wrong</div> | |
52 | {{ error }} | |
53 | </div> | |
54 | ||
55 | <div *ngIf="hasImportedVideo && !error" class="alert alert-info" i18n> | |
ce33919c C |
56 | Congratulations, the video will be imported with BitTorrent! You can already add information about this video. |
57 | </div> | |
58 | ||
59 | <!-- Hidden because we want to load the component --> | |
60 | <form [hidden]="!hasImportedVideo" novalidate [formGroup]="form"> | |
61 | <my-video-edit | |
4afec735 | 62 | [form]="form" [formErrors]="formErrors" [videoCaptions]="videoCaptions" [forbidScheduledPublication]="true" |
851f5daa | 63 | [validationMessages]="validationMessages" [userVideoChannels]="userVideoChannels" |
7294aab0 | 64 | type="import-torrent" |
ce33919c C |
65 | ></my-video-edit> |
66 | ||
67 | <div class="submit-container"> | |
1ef7f323 C |
68 | <my-button className="orange-button" i18n-label label="Update" icon="circle-tick" |
69 | (click)="updateSecondStep()" | |
70 | [disabled]="!form.valid || isUpdatingVideo === true" | |
71 | ></my-button> | |
ce33919c C |
72 | </div> |
73 | </form> |