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