]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - 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
1 <ng-template #modal let-hide="close">
2 <div class="modal-header">
3 <h4 class="modal-title">
4 <ng-container i18n>Download</ng-container>
5
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>
11 </div>
12 </h4>
13
14 <my-global-icon iconName="cross" aria-label="Close" role="button" (click)="hide()"></my-global-icon>
15 </div>
16
17 <div class="modal-body">
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>
21
22 <!-- Subtitle tab -->
23 <ng-container *ngIf="type === 'subtitles'">
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 <my-input-text
32 *ngIf="!isConfidentialVideo()"
33 [show]="true" [readonly]="true" [withCopy]="true" [withToggle]="false" [value]="getLink()"
34 ></my-input-text>
35 </div>
36 </ng-template>
37 </ng-container>
38 </div>
39
40 <div [ngbNavOutlet]="subtitleNav"></div>
41 </ng-container>
42
43 <!-- Video tab -->
44 <ng-container *ngIf="type === 'video'">
45 <div ngbNav #resolutionNav="ngbNav" class="nav-tabs" [activeId]="resolutionId" (activeIdChange)="onResolutionIdChange($event)">
46 <ng-container *ngFor="let file of getVideoFiles()" [ngbNavItem]="file.resolution.id">
47 <a ngbNavLink i18n>{{ file.resolution.label }}</a>
48
49 <ng-template ngbNavContent>
50 <div class="nav-content">
51 <my-input-text
52 *ngIf="!isConfidentialVideo()"
53 [show]="true" [readonly]="true" [withCopy]="true" [withToggle]="false" [value]="getLink()"
54 ></my-input-text>
55 </div>
56 </ng-template>
57 </ng-container>
58 </div>
59
60 <div [ngbNavOutlet]="resolutionNav"></div>
61
62 <div class="advanced-filters collapse-transition" [ngbCollapse]="isAdvancedCustomizationCollapsed">
63 <div ngbNav #navMetadata="ngbNav" class="nav-tabs nav-metadata">
64 <ng-container ngbNavItem>
65 <a ngbNavLink i18n>Format</a>
66 <ng-template ngbNavContent>
67 <div class="file-metadata">
68 <div class="metadata-attribute metadata-attribute-tags" *ngFor="let item of videoFileMetadataFormat | keyvalue">
69 <span i18n class="metadata-attribute-label">{{ item.value.label }}</span>
70 <span class="metadata-attribute-value">{{ item.value.value }}</span>
71 </div>
72 </div>
73 </ng-template>
74
75 <ng-container ngbNavItem [disabled]="videoFileMetadataVideoStream === undefined">
76 <a ngbNavLink i18n>Video stream</a>
77 <ng-template ngbNavContent>
78 <div class="file-metadata">
79 <div class="metadata-attribute metadata-attribute-tags" *ngFor="let item of videoFileMetadataVideoStream | keyvalue">
80 <span i18n class="metadata-attribute-label">{{ item.value.label }}</span>
81 <span class="metadata-attribute-value">{{ item.value.value }}</span>
82 </div>
83 </div>
84 </ng-template>
85 </ng-container>
86
87 <ng-container ngbNavItem [disabled]="videoFileMetadataAudioStream === undefined">
88 <a ngbNavLink i18n>Audio stream</a>
89 <ng-template ngbNavContent>
90 <div class="file-metadata">
91 <div class="metadata-attribute metadata-attribute-tags" *ngFor="let item of videoFileMetadataAudioStream | keyvalue">
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>
97 </ng-container>
98
99 </ng-container>
100 </div>
101
102 <div *ngIf="getFileMetadata()" [ngbNavOutlet]="navMetadata"></div>
103
104 <div class="download-type">
105 <div class="peertube-radio-container">
106 <input type="radio" name="download" id="download-direct" [(ngModel)]="downloadType" value="direct">
107 <label i18n for="download-direct">Direct download</label>
108 </div>
109
110 <div class="peertube-radio-container">
111 <input type="radio" name="download" id="download-torrent" [(ngModel)]="downloadType" value="torrent">
112 <label i18n for="download-torrent">Torrent (.torrent file)</label>
113 </div>
114 </div>
115 </div>
116
117 <div
118 (click)="isAdvancedCustomizationCollapsed = !isAdvancedCustomizationCollapsed"
119 role="button" class="advanced-filters-button"
120 [attr.aria-expanded]="!isAdvancedCustomizationCollapsed" aria-controls="collapseBasic"
121 >
122 <ng-container *ngIf="isAdvancedCustomizationCollapsed">
123 <span class="chevron-down"></span>
124
125 <ng-container i18n>
126 Advanced
127 </ng-container>
128 </ng-container>
129
130 <ng-container *ngIf="!isAdvancedCustomizationCollapsed">
131 <span class="chevron-up"></span>
132
133 <ng-container i18n>
134 Simple
135 </ng-container>
136 </ng-container>
137 </div>
138 </ng-container>
139 </div>
140
141 <div class="modal-footer inputs">
142 <input
143 type="button" role="button" i18n-value value="Cancel" class="peertube-button grey-button"
144 (click)="hide()" (key.enter)="hide()"
145 >
146
147 <input type="submit" i18n-value value="Download" class="peertube-button orange-button" (click)="download()" />
148 </div>
149 </ng-template>