]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/shared/video/modals/video-download.component.html
Generate translations
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / video / modals / video-download.component.html
1 <ng-template #modal let-hide="close">
2 <div class="modal-header">
3 <h4 class="modal-title">Download
4 <span *ngIf="!videoCaptions" i18n>video</span>
5
6 <div *ngIf="videoCaptions" ngbDropdown class="d-inline-block">
7 <span id="dropdownDownloadType" ngbDropdownToggle>
8 {{ type }}
9 </span>
10 <div ngbDropdownMenu aria-labelledby="dropdownDownloadType">
11 <button *ngIf="type === 'video'" (click)="switchToType('subtitles')" ngbDropdownItem i18n>subtitles</button>
12 <button *ngIf="type === 'subtitles'" (click)="switchToType('video')" ngbDropdownItem i18n>video</button>
13 </div>
14 </div>
15 </h4>
16 <my-global-icon iconName="cross" aria-label="Close" role="button" (click)="hide()"></my-global-icon>
17 </div>
18
19 <div class="modal-body">
20 <div class="form-group">
21 <div class="input-group input-group-sm">
22 <div class="input-group-prepend peertube-select-container">
23 <select *ngIf="type === 'video'" [(ngModel)]="resolutionId">
24 <option *ngFor="let file of getVideoFiles()" [value]="file.resolution.id">{{ file.resolution.label }}</option>
25 </select>
26 <select *ngIf="type === 'subtitles'" [(ngModel)]="subtitleLanguageId">
27 <option *ngFor="let caption of videoCaptions" [value]="caption.language.id">{{ caption.language.label }}</option>
28 </select>
29 </div>
30 <input #urlInput (click)="urlInput.select()" type="text" class="form-control input-sm readonly" readonly [value]="getLink()" />
31 <div class="input-group-append">
32 <button [ngxClipboard]="urlInput" (click)="activateCopiedMessage()" type="button" class="btn btn-outline-secondary">
33 <span class="glyphicon glyphicon-copy"></span>
34 </button>
35 </div>
36 </div>
37 </div>
38
39 <div class="download-type" *ngIf="type === 'video'">
40 <div class="peertube-radio-container">
41 <input type="radio" name="download" id="download-direct" [(ngModel)]="downloadType" value="direct">
42 <label i18n for="download-direct">Direct download</label>
43 </div>
44
45 <div class="peertube-radio-container">
46 <input type="radio" name="download" id="download-torrent" [(ngModel)]="downloadType" value="torrent">
47 <label i18n for="download-torrent">Torrent (.torrent file)</label>
48 </div>
49 </div>
50 </div>
51
52 <div class="modal-footer inputs">
53 <span i18n class="action-button action-button-cancel" (click)="hide()">
54 Cancel
55 </span>
56
57 <input
58 type="submit" i18n-value value="Download" class="action-button-submit"
59 (click)="download()"
60 >
61 </div>
62 </ng-template>