]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/shared/shared-video-miniature/video-download.component.html
Deprecate filter video query
[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">
31 <div class="input-group input-group-sm">
32 <input #urlInput (click)="urlInput.select()" type="text" class="form-control input-sm readonly" readonly [value]="getLink()" />
33
34 <div class="input-group-append" *ngIf="!isConfidentialVideo()">
35 <button [cdkCopyToClipboard]="urlInput.value" (click)="activateCopiedMessage()" type="button" class="btn btn-outline-secondary">
36 <span class="glyphicon glyphicon-duplicate"></span>
37 </button>
38 </div>
39 </div>
40 </div>
41 </ng-template>
42 </ng-container>
bb5d7428 43 </div>
262f8ff6
C
44
45 <div [ngbNavOutlet]="subtitleNav"></div>
cf3c3624 46 </ng-container>
5511da62 47
262f8ff6 48 <!-- Video tab -->
cf3c3624 49 <ng-container *ngIf="type === 'video'">
50 <div ngbNav #resolutionNav="ngbNav" class="nav-tabs" [activeId]="resolutionId" (activeIdChange)="onResolutionIdChange($event)">
cf3c3624 51 <ng-container *ngFor="let file of getVideoFiles()" [ngbNavItem]="file.resolution.id">
52 <a ngbNavLink i18n>{{ file.resolution.label }}</a>
266947e5 53
45c6bcf3 54 <ng-template ngbNavContent>
cf3c3624 55 <div class="nav-content">
56 <div class="input-group input-group-sm">
57 <input #urlInput (click)="urlInput.select()" type="text" class="form-control input-sm readonly" readonly [value]="getLink()" />
58 <div class="input-group-append" *ngIf="!isConfidentialVideo()">
59 <button [cdkCopyToClipboard]="urlInput.value" (click)="activateCopiedMessage()" type="button" class="btn btn-outline-secondary">
60 <span class="glyphicon glyphicon-duplicate"></span>
61 </button>
62 </div>
45c6bcf3 63 </div>
8319d6ae 64 </div>
45c6bcf3
C
65 </ng-template>
66 </ng-container>
cf3c3624 67 </div>
262f8ff6 68
cf3c3624 69 <div [ngbNavOutlet]="resolutionNav"></div>
266947e5 70
cf3c3624 71 <div class="advanced-filters collapse-transition" [ngbCollapse]="isAdvancedCustomizationCollapsed">
262f8ff6
C
72 <div ngbNav #navMetadata="ngbNav" class="nav-tabs nav-metadata">
73 <ng-container ngbNavItem>
74 <a ngbNavLink i18n>Format</a>
75 <ng-template ngbNavContent>
76 <div class="file-metadata">
77 <div class="metadata-attribute metadata-attribute-tags" *ngFor="let item of videoFileMetadataFormat | keyvalue">
78 <span i18n class="metadata-attribute-label">{{ item.value.label }}</span>
79 <span class="metadata-attribute-value">{{ item.value.value }}</span>
80 </div>
81 </div>
82 </ng-template>
83
84 <ng-container ngbNavItem [disabled]="videoFileMetadataVideoStream === undefined">
85 <a ngbNavLink i18n>Video stream</a>
cf3c3624 86 <ng-template ngbNavContent>
87 <div class="file-metadata">
262f8ff6 88 <div class="metadata-attribute metadata-attribute-tags" *ngFor="let item of videoFileMetadataVideoStream | keyvalue">
cf3c3624 89 <span i18n class="metadata-attribute-label">{{ item.value.label }}</span>
90 <span class="metadata-attribute-value">{{ item.value.value }}</span>
91 </div>
92 </div>
93 </ng-template>
262f8ff6 94 </ng-container>
266947e5 95
262f8ff6
C
96 <ng-container ngbNavItem [disabled]="videoFileMetadataAudioStream === undefined">
97 <a ngbNavLink i18n>Audio stream</a>
98 <ng-template ngbNavContent>
99 <div class="file-metadata">
100 <div class="metadata-attribute metadata-attribute-tags" *ngFor="let item of videoFileMetadataAudioStream | keyvalue">
101 <span i18n class="metadata-attribute-label">{{ item.value.label }}</span>
102 <span class="metadata-attribute-value">{{ item.value.value }}</span>
cf3c3624 103 </div>
262f8ff6
C
104 </div>
105 </ng-template>
cf3c3624 106 </ng-container>
262f8ff6
C
107
108 </ng-container>
109 </div>
110
111 <div *ngIf="getFileMetadata()" [ngbNavOutlet]="navMetadata"></div>
112
113 <div class="download-type">
114 <div class="peertube-radio-container">
115 <input type="radio" name="download" id="download-direct" [(ngModel)]="downloadType" value="direct">
116 <label i18n for="download-direct">Direct download</label>
cf3c3624 117 </div>
262f8ff6
C
118
119 <div class="peertube-radio-container">
120 <input type="radio" name="download" id="download-torrent" [(ngModel)]="downloadType" value="torrent">
121 <label i18n for="download-torrent">Torrent (.torrent file)</label>
cf3c3624 122 </div>
262f8ff6 123 </div>
45c6bcf3 124 </div>
266947e5 125
262f8ff6
C
126 <div
127 (click)="isAdvancedCustomizationCollapsed = !isAdvancedCustomizationCollapsed"
128 role="button" class="advanced-filters-button"
129 [attr.aria-expanded]="!isAdvancedCustomizationCollapsed" aria-controls="collapseBasic"
130 >
cf3c3624 131 <ng-container *ngIf="isAdvancedCustomizationCollapsed">
132 <span class="glyphicon glyphicon-menu-down"></span>
266947e5 133
cf3c3624 134 <ng-container i18n>
135 Advanced
136 </ng-container>
137 </ng-container>
266947e5 138
cf3c3624 139 <ng-container *ngIf="!isAdvancedCustomizationCollapsed">
140 <span class="glyphicon glyphicon-menu-up"></span>
266947e5 141
cf3c3624 142 <ng-container i18n>
143 Simple
144 </ng-container>
145 </ng-container>
63347a0f 146 </div>
cf3c3624 147 </ng-container>
a96aed15 148 </div>
63347a0f
C
149
150 <div class="modal-footer inputs">
a6d5ff76 151 <input
266947e5 152 type="button" role="button" i18n-value value="Cancel" class="peertube-button grey-button"
a6d5ff76
RK
153 (click)="hide()" (key.enter)="hide()"
154 >
63347a0f 155
266947e5 156 <input type="submit" i18n-value value="Download" class="peertube-button orange-button" (click)="download()" />
63347a0f
C
157 </div>
158</ng-template>