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