]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/shared/shared-video-miniature/video-download.component.html
Merge branch 'release/4.2.0' into develop
[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
262f8ff6
C
6 <div class="peertube-select-container title-select" *ngIf="hasCaptions()">
7 <select id="type" name="type" [(ngModel)]="type" class="form-control">
8 <option value="video" i18n>Video</option>
9 <option value="subtitles" i18n>Subtitles</option>
10 </select>
8ba9c205
RK
11 </div>
12 </h4>
262f8ff6 13
457bb213 14 <my-global-icon iconName="cross" aria-label="Close" role="button" (click)="hide()"></my-global-icon>
63347a0f 15 </div>
5f0805d3 16
63347a0f 17 <div class="modal-body">
cf3c3624 18 <div class="alert alert-warning" *ngIf="isConfidentialVideo()" i18n>
19 The following link contains a private token and should not be shared with anyone.
20 </div>
51294901 21
262f8ff6 22 <!-- Subtitle tab -->
cf3c3624 23 <ng-container *ngIf="type === 'subtitles'">
262f8ff6
C
24 <div ngbNav #subtitleNav="ngbNav" class="nav-tabs" [activeId]="subtitleLanguageId" (activeIdChange)="onSubtitleIdChange($event)">
25
26 <ng-container *ngFor="let caption of getCaptions()" [ngbNavItem]="caption.language.id">
27 <a ngbNavLink i18n>{{ caption.language.label }}</a>
28
29 <ng-template ngbNavContent>
30 <div class="nav-content">
4c8749cb
C
31 <div class="input-group">
32 <input #urlInput (click)="urlInput.select()" type="text" class="form-control readonly" readonly [value]="getLink()" />
262f8ff6 33
4c8749cb
C
34 <button
35 *ngIf="!isConfidentialVideo()" type="button" class="btn btn-outline-secondary"
36 [cdkCopyToClipboard]="urlInput.value" (click)="activateCopiedMessage()"
37 >
38 <span class="glyphicon glyphicon-duplicate"></span>
39 </button>
262f8ff6
C
40 </div>
41 </div>
42 </ng-template>
43 </ng-container>
bb5d7428 44 </div>
262f8ff6
C
45
46 <div [ngbNavOutlet]="subtitleNav"></div>
cf3c3624 47 </ng-container>
5511da62 48
262f8ff6 49 <!-- Video tab -->
cf3c3624 50 <ng-container *ngIf="type === 'video'">
51 <div ngbNav #resolutionNav="ngbNav" class="nav-tabs" [activeId]="resolutionId" (activeIdChange)="onResolutionIdChange($event)">
cf3c3624 52 <ng-container *ngFor="let file of getVideoFiles()" [ngbNavItem]="file.resolution.id">
53 <a ngbNavLink i18n>{{ file.resolution.label }}</a>
266947e5 54
45c6bcf3 55 <ng-template ngbNavContent>
cf3c3624 56 <div class="nav-content">
4c8749cb
C
57 <div class="input-group">
58 <input #urlInput (click)="urlInput.select()" type="text" class="form-control readonly" readonly [value]="getLink()" />
59
60 <button
61 *ngIf="!isConfidentialVideo()" type="button" class="btn btn-outline-secondary"
62 [cdkCopyToClipboard]="urlInput.value" (click)="activateCopiedMessage()"
63 >
64 <span class="glyphicon glyphicon-duplicate"></span>
65 </button>
45c6bcf3 66 </div>
8319d6ae 67 </div>
45c6bcf3
C
68 </ng-template>
69 </ng-container>
cf3c3624 70 </div>
262f8ff6 71
cf3c3624 72 <div [ngbNavOutlet]="resolutionNav"></div>
266947e5 73
cf3c3624 74 <div class="advanced-filters collapse-transition" [ngbCollapse]="isAdvancedCustomizationCollapsed">
262f8ff6
C
75 <div ngbNav #navMetadata="ngbNav" class="nav-tabs nav-metadata">
76 <ng-container ngbNavItem>
77 <a ngbNavLink i18n>Format</a>
78 <ng-template ngbNavContent>
79 <div class="file-metadata">
80 <div class="metadata-attribute metadata-attribute-tags" *ngFor="let item of videoFileMetadataFormat | keyvalue">
81 <span i18n class="metadata-attribute-label">{{ item.value.label }}</span>
82 <span class="metadata-attribute-value">{{ item.value.value }}</span>
83 </div>
84 </div>
85 </ng-template>
86
87 <ng-container ngbNavItem [disabled]="videoFileMetadataVideoStream === undefined">
88 <a ngbNavLink i18n>Video stream</a>
cf3c3624 89 <ng-template ngbNavContent>
90 <div class="file-metadata">
262f8ff6 91 <div class="metadata-attribute metadata-attribute-tags" *ngFor="let item of videoFileMetadataVideoStream | keyvalue">
cf3c3624 92 <span i18n class="metadata-attribute-label">{{ item.value.label }}</span>
93 <span class="metadata-attribute-value">{{ item.value.value }}</span>
94 </div>
95 </div>
96 </ng-template>
262f8ff6 97 </ng-container>
266947e5 98
262f8ff6
C
99 <ng-container ngbNavItem [disabled]="videoFileMetadataAudioStream === undefined">
100 <a ngbNavLink i18n>Audio stream</a>
101 <ng-template ngbNavContent>
102 <div class="file-metadata">
103 <div class="metadata-attribute metadata-attribute-tags" *ngFor="let item of videoFileMetadataAudioStream | keyvalue">
104 <span i18n class="metadata-attribute-label">{{ item.value.label }}</span>
105 <span class="metadata-attribute-value">{{ item.value.value }}</span>
cf3c3624 106 </div>
262f8ff6
C
107 </div>
108 </ng-template>
cf3c3624 109 </ng-container>
262f8ff6
C
110
111 </ng-container>
112 </div>
113
114 <div *ngIf="getFileMetadata()" [ngbNavOutlet]="navMetadata"></div>
115
116 <div class="download-type">
117 <div class="peertube-radio-container">
118 <input type="radio" name="download" id="download-direct" [(ngModel)]="downloadType" value="direct">
119 <label i18n for="download-direct">Direct download</label>
cf3c3624 120 </div>
262f8ff6
C
121
122 <div class="peertube-radio-container">
123 <input type="radio" name="download" id="download-torrent" [(ngModel)]="downloadType" value="torrent">
124 <label i18n for="download-torrent">Torrent (.torrent file)</label>
cf3c3624 125 </div>
262f8ff6 126 </div>
45c6bcf3 127 </div>
266947e5 128
262f8ff6
C
129 <div
130 (click)="isAdvancedCustomizationCollapsed = !isAdvancedCustomizationCollapsed"
131 role="button" class="advanced-filters-button"
132 [attr.aria-expanded]="!isAdvancedCustomizationCollapsed" aria-controls="collapseBasic"
133 >
cf3c3624 134 <ng-container *ngIf="isAdvancedCustomizationCollapsed">
135 <span class="glyphicon glyphicon-menu-down"></span>
266947e5 136
cf3c3624 137 <ng-container i18n>
138 Advanced
139 </ng-container>
140 </ng-container>
266947e5 141
cf3c3624 142 <ng-container *ngIf="!isAdvancedCustomizationCollapsed">
143 <span class="glyphicon glyphicon-menu-up"></span>
266947e5 144
cf3c3624 145 <ng-container i18n>
146 Simple
147 </ng-container>
148 </ng-container>
63347a0f 149 </div>
cf3c3624 150 </ng-container>
a96aed15 151 </div>
63347a0f
C
152
153 <div class="modal-footer inputs">
a6d5ff76 154 <input
266947e5 155 type="button" role="button" i18n-value value="Cancel" class="peertube-button grey-button"
a6d5ff76
RK
156 (click)="hide()" (key.enter)="hide()"
157 >
63347a0f 158
266947e5 159 <input type="submit" i18n-value value="Download" class="peertube-button orange-button" (click)="download()" />
63347a0f
C
160 </div>
161</ng-template>