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