]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/shared/shared-video-miniature/video-download.component.html
Add warning in download modal if needed
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-video-miniature / video-download.component.html
CommitLineData
63347a0f
C
1<ng-template #modal let-hide="close">
2 <div class="modal-header">
45c6bcf3
C
3 <h4 class="modal-title">
4 <ng-container i18n>Download</ng-container>
f332ffa2 5
82479cf1 6 <div *ngIf="videoCaptions" ngbDropdown class="d-inline-block ml-1">
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 20 <div class="form-group">
51294901
C
21 <div class="alert alert-warning" *ngIf="isConfidentialVideo()" i18n>
22 The following link contains a private token and should not be shared with anyone.
23 </div>
24
bb5d7428
RK
25 <div class="input-group input-group-sm">
26 <div class="input-group-prepend peertube-select-container">
8319d6ae 27 <select *ngIf="type === 'video'" [(ngModel)]="resolutionId" (ngModelChange)="onResolutionIdChange()">
5a71acd2 28 <option *ngFor="let file of getVideoFiles()" [value]="file.resolution.id">{{ file.resolution.label }}</option>
bb5d7428 29 </select>
7811819b 30
8ba9c205
RK
31 <select *ngIf="type === 'subtitles'" [(ngModel)]="subtitleLanguageId">
32 <option *ngFor="let caption of videoCaptions" [value]="caption.language.id">{{ caption.language.label }}</option>
33 </select>
bb5d7428 34 </div>
7811819b 35
bb5d7428 36 <input #urlInput (click)="urlInput.select()" type="text" class="form-control input-sm readonly" readonly [value]="getLink()" />
51294901 37 <div class="input-group-append" *ngIf="!isConfidentialVideo()">
7811819b 38 <button [cdkCopyToClipboard]="urlInput.value" (click)="activateCopiedMessage()" type="button" class="btn btn-outline-secondary">
bb5d7428
RK
39 <span class="glyphicon glyphicon-copy"></span>
40 </button>
41 </div>
42 </div>
63347a0f 43 </div>
5511da62 44
45c6bcf3
C
45 <ng-container *ngIf="type === 'video' && videoFile?.metadata">
46 <div ngbNav #nav="ngbNav" class="nav-tabs">
47
48 <ng-container ngbNavItem>
49 <a ngbNavLink i18n>Format</a>
50 <ng-template ngbNavContent>
51 <div class="file-metadata">
52 <div class="metadata-attribute metadata-attribute-tags" *ngFor="let item of videoFileMetadataFormat | keyvalue">
53 <span i18n class="metadata-attribute-label">{{ item.value.label }}</span>
54 <span class="metadata-attribute-value">{{ item.value.value }}</span>
55 </div>
8319d6ae 56 </div>
45c6bcf3
C
57 </ng-template>
58 </ng-container>
59
60 <ng-container ngbNavItem [disabled]="videoFileMetadataVideoStream === undefined">
61 <a ngbNavLink i18n>Video stream</a>
62 <ng-template ngbNavContent>
63 <div class="file-metadata">
64 <div class="metadata-attribute metadata-attribute-tags" *ngFor="let item of videoFileMetadataVideoStream | keyvalue">
65 <span i18n class="metadata-attribute-label">{{ item.value.label }}</span>
66 <span class="metadata-attribute-value">{{ item.value.value }}</span>
67 </div>
8319d6ae 68 </div>
45c6bcf3
C
69 </ng-template>
70 </ng-container>
71
72 <ng-container ngbNavItem [disabled]="videoFileMetadataAudioStream === undefined">
73 <a ngbNavLink i18n>Audio stream</a>
74 <ng-template ngbNavContent>
75 <div class="file-metadata">
76 <div class="metadata-attribute metadata-attribute-tags" *ngFor="let item of videoFileMetadataAudioStream | keyvalue">
77 <span i18n class="metadata-attribute-label">{{ item.value.label }}</span>
78 <span class="metadata-attribute-value">{{ item.value.value }}</span>
79 </div>
8319d6ae 80 </div>
45c6bcf3
C
81 </ng-template>
82 </ng-container>
83 </div>
84
85 <div [ngbNavOutlet]="nav"></div>
86 </ng-container>
8319d6ae 87
8ba9c205 88 <div class="download-type" *ngIf="type === 'video'">
63347a0f
C
89 <div class="peertube-radio-container">
90 <input type="radio" name="download" id="download-direct" [(ngModel)]="downloadType" value="direct">
91 <label i18n for="download-direct">Direct download</label>
92 </div>
0727cab0 93
63347a0f
C
94 <div class="peertube-radio-container">
95 <input type="radio" name="download" id="download-torrent" [(ngModel)]="downloadType" value="torrent">
96 <label i18n for="download-torrent">Torrent (.torrent file)</label>
97 </div>
a96aed15
C
98 </div>
99 </div>
63347a0f
C
100
101 <div class="modal-footer inputs">
a6d5ff76
RK
102 <input
103 type="button" role="button" i18n-value value="Cancel" class="action-button action-button-cancel"
104 (click)="hide()" (key.enter)="hide()"
105 >
63347a0f
C
106
107 <input
108 type="submit" i18n-value value="Download" class="action-button-submit"
109 (click)="download()"
110 >
111 </div>
112</ng-template>