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