]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/shared/shared-video-miniature/video-download.component.html
Migrate to bootstrap 5
[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 <div class="input-group">
32 <input #urlInput (click)="urlInput.select()" type="text" class="form-control readonly" readonly [value]="getLink()" />
33
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>
40 </div>
41 </div>
42 </ng-template>
43 </ng-container>
44 </div>
45
46 <div [ngbNavOutlet]="subtitleNav"></div>
47 </ng-container>
48
49 <!-- Video tab -->
50 <ng-container *ngIf="type === 'video'">
51 <div ngbNav #resolutionNav="ngbNav" class="nav-tabs" [activeId]="resolutionId" (activeIdChange)="onResolutionIdChange($event)">
52 <ng-container *ngFor="let file of getVideoFiles()" [ngbNavItem]="file.resolution.id">
53 <a ngbNavLink i18n>{{ file.resolution.label }}</a>
54
55 <ng-template ngbNavContent>
56 <div class="nav-content">
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>
66 </div>
67 </div>
68 </ng-template>
69 </ng-container>
70 </div>
71
72 <div [ngbNavOutlet]="resolutionNav"></div>
73
74 <div class="advanced-filters collapse-transition" [ngbCollapse]="isAdvancedCustomizationCollapsed">
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>
89 <ng-template ngbNavContent>
90 <div class="file-metadata">
91 <div class="metadata-attribute metadata-attribute-tags" *ngFor="let item of videoFileMetadataVideoStream | 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 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>
106 </div>
107 </div>
108 </ng-template>
109 </ng-container>
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>
120 </div>
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>
125 </div>
126 </div>
127 </div>
128
129 <div
130 (click)="isAdvancedCustomizationCollapsed = !isAdvancedCustomizationCollapsed"
131 role="button" class="advanced-filters-button"
132 [attr.aria-expanded]="!isAdvancedCustomizationCollapsed" aria-controls="collapseBasic"
133 >
134 <ng-container *ngIf="isAdvancedCustomizationCollapsed">
135 <span class="glyphicon glyphicon-menu-down"></span>
136
137 <ng-container i18n>
138 Advanced
139 </ng-container>
140 </ng-container>
141
142 <ng-container *ngIf="!isAdvancedCustomizationCollapsed">
143 <span class="glyphicon glyphicon-menu-up"></span>
144
145 <ng-container i18n>
146 Simple
147 </ng-container>
148 </ng-container>
149 </div>
150 </ng-container>
151 </div>
152
153 <div class="modal-footer inputs">
154 <input
155 type="button" role="button" i18n-value value="Cancel" class="peertube-button grey-button"
156 (click)="hide()" (key.enter)="hide()"
157 >
158
159 <input type="submit" i18n-value value="Download" class="peertube-button orange-button" (click)="download()" />
160 </div>
161 </ng-template>