1 <div *ngIf="!hasImportedVideo" class="upload-video-container" dragDrop (fileDropped)="setTorrentFile($event)">
2 <div class="first-step-block">
3 <my-global-icon class="upload-icon" iconName="upload" aria-hidden="true"></my-global-icon>
5 <div class="button-file form-control" [ngbTooltip]="'(extensions: .torrent)'">
6 <span i18n>Select the torrent to import</span>
7 <input #torrentfileInput type="file" name="torrentfile" id="torrentfile" accept=".torrent" (change)="fileChange()" />
10 <div class="torrent-or-magnet" i18n-data-content data-content="OR"></div>
12 <div class="form-group form-group-magnet-uri">
13 <label i18n for="magnetUri">Paste magnet URI</label>
15 <ng-template ptTemplate="customHtml">
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.
23 <input type="text" id="magnetUri" [(ngModel)]="magnetUri" class="form-control" />
26 <div class="form-group">
27 <label i18n for="first-step-channel">Channel</label>
28 <div class="peertube-select-container">
29 <select id="first-step-channel" [(ngModel)]="firstStepChannelId" class="form-control">
30 <option *ngFor="let channel of userVideoChannels" [value]="channel.id">{{ channel.label }}</option>
35 <div class="form-group">
36 <label i18n for="first-step-privacy">Privacy</label>
37 <div class="peertube-select-container">
38 <select id="first-step-privacy" [(ngModel)]="firstStepPrivacyId" class="form-control">
39 <option *ngFor="let privacy of videoPrivacies" [value]="privacy.id">{{ privacy.label }}</option>
45 type="button" i18n-value value="Import"
46 [disabled]="!isMagnetUrlValid() || isImportingVideo" (click)="importVideo()"
51 <div *ngIf="error" class="alert alert-danger">
52 <div i18n>Sorry, but something went wrong</div>
56 <div *ngIf="hasImportedVideo && !error" class="alert alert-info" i18n>
57 Congratulations, the video will be imported with BitTorrent! You can already add information about this video.
60 <!-- Hidden because we want to load the component -->
61 <form [hidden]="!hasImportedVideo" novalidate [formGroup]="form">
63 [form]="form" [formErrors]="formErrors" [videoCaptions]="videoCaptions" [schedulePublicationPossible]="false"
64 [validationMessages]="validationMessages" [userVideoChannels]="userVideoChannels"
67 <div class="submit-container">
68 <div class="submit-button"
69 (click)="updateSecondStep()"
70 [ngClass]="{ disabled: !form.valid || isUpdatingVideo === true }"
72 <my-global-icon iconName="validate" aria-hidden="true"></my-global-icon>
73 <input type="button" i18n-value value="Update" />