]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/videos/+video-edit/video-add-components/video-import-torrent.component.html
add aria-hidden to non-descriptive icons (#2844)
[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
C
2 <div class="first-step-block">
3 <my-global-icon class="upload-icon" iconName="upload"></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>
28 <div class="peertube-select-container">
c9ff8a08 29 <select id="first-step-channel" [(ngModel)]="firstStepChannelId" class="form-control">
ce33919c
C
30 <option *ngFor="let channel of userVideoChannels" [value]="channel.id">{{ channel.label }}</option>
31 </select>
32 </div>
33 </div>
34
35 <div class="form-group">
36 <label i18n for="first-step-privacy">Privacy</label>
37 <div class="peertube-select-container">
c9ff8a08 38 <select id="first-step-privacy" [(ngModel)]="firstStepPrivacyId" class="form-control">
ce33919c
C
39 <option *ngFor="let privacy of videoPrivacies" [value]="privacy.id">{{ privacy.label }}</option>
40 </select>
41 </div>
42 </div>
43
44 <input
45 type="button" i18n-value value="Import"
46 [disabled]="!isMagnetUrlValid() || isImportingVideo" (click)="importVideo()"
47 />
48 </div>
49</div>
50
7373507f
C
51<div *ngIf="error" class="alert alert-danger">
52 <div i18n>Sorry, but something went wrong</div>
53 {{ error }}
54</div>
55
56<div *ngIf="hasImportedVideo && !error" class="alert alert-info" i18n>
ce33919c
C
57 Congratulations, the video will be imported with BitTorrent! You can already add information about this video.
58</div>
59
60<!-- Hidden because we want to load the component -->
61<form [hidden]="!hasImportedVideo" novalidate [formGroup]="form">
62 <my-video-edit
63 [form]="form" [formErrors]="formErrors" [videoCaptions]="videoCaptions" [schedulePublicationPossible]="false"
851f5daa 64 [validationMessages]="validationMessages" [userVideoChannels]="userVideoChannels"
ce33919c
C
65 ></my-video-edit>
66
67 <div class="submit-container">
68 <div class="submit-button"
69 (click)="updateSecondStep()"
70 [ngClass]="{ disabled: !form.valid || isUpdatingVideo === true }"
71 >
6ad971d5 72 <my-global-icon iconName="validate" aria-hidden="true"></my-global-icon>
ce33919c
C
73 <input type="button" i18n-value value="Update" />
74 </div>
75 </div>
76</form>