]>
Commit | Line | Data |
---|---|---|
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"> |
a70bf3bd | 51 | <my-input-text |
b15fcd49 C |
52 | *ngIf="!isConfidentialVideo()" |
53 | [show]="true" [readonly]="true" [withCopy]="true" [withToggle]="false" [value]="getLink()" | |
a70bf3bd | 54 | ></my-input-text> |
8319d6ae | 55 | </div> |
45c6bcf3 C |
56 | </ng-template> |
57 | </ng-container> | |
cf3c3624 | 58 | </div> |
262f8ff6 | 59 | |
cf3c3624 | 60 | <div [ngbNavOutlet]="resolutionNav"></div> |
266947e5 | 61 | |
cf3c3624 | 62 | <div class="advanced-filters collapse-transition" [ngbCollapse]="isAdvancedCustomizationCollapsed"> |
262f8ff6 C |
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> | |
cf3c3624 | 77 | <ng-template ngbNavContent> |
78 | <div class="file-metadata"> | |
262f8ff6 | 79 | <div class="metadata-attribute metadata-attribute-tags" *ngFor="let item of videoFileMetadataVideoStream | keyvalue"> |
cf3c3624 | 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> | |
262f8ff6 | 85 | </ng-container> |
266947e5 | 86 | |
262f8ff6 C |
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> | |
cf3c3624 | 94 | </div> |
262f8ff6 C |
95 | </div> |
96 | </ng-template> | |
cf3c3624 | 97 | </ng-container> |
262f8ff6 C |
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> | |
cf3c3624 | 108 | </div> |
262f8ff6 C |
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> | |
cf3c3624 | 113 | </div> |
262f8ff6 | 114 | </div> |
45c6bcf3 | 115 | </div> |
266947e5 | 116 | |
262f8ff6 C |
117 | <div |
118 | (click)="isAdvancedCustomizationCollapsed = !isAdvancedCustomizationCollapsed" | |
119 | role="button" class="advanced-filters-button" | |
120 | [attr.aria-expanded]="!isAdvancedCustomizationCollapsed" aria-controls="collapseBasic" | |
121 | > | |
cf3c3624 | 122 | <ng-container *ngIf="isAdvancedCustomizationCollapsed"> |
93c728a2 | 123 | <span class="chevron-down"></span> |
266947e5 | 124 | |
cf3c3624 | 125 | <ng-container i18n> |
126 | Advanced | |
127 | </ng-container> | |
128 | </ng-container> | |
266947e5 | 129 | |
cf3c3624 | 130 | <ng-container *ngIf="!isAdvancedCustomizationCollapsed"> |
93c728a2 | 131 | <span class="chevron-up"></span> |
266947e5 | 132 | |
cf3c3624 | 133 | <ng-container i18n> |
134 | Simple | |
135 | </ng-container> | |
136 | </ng-container> | |
63347a0f | 137 | </div> |
cf3c3624 | 138 | </ng-container> |
a96aed15 | 139 | </div> |
63347a0f C |
140 | |
141 | <div class="modal-footer inputs"> | |
a6d5ff76 | 142 | <input |
266947e5 | 143 | type="button" role="button" i18n-value value="Cancel" class="peertube-button grey-button" |
a6d5ff76 RK |
144 | (click)="hide()" (key.enter)="hide()" |
145 | > | |
63347a0f | 146 | |
266947e5 | 147 | <input type="submit" i18n-value value="Download" class="peertube-button orange-button" (click)="download()" /> |
63347a0f C |
148 | </div> |
149 | </ng-template> |