diff options
Diffstat (limited to 'client/src/app/shared/shared-video-miniature/video-download.component.html')
-rw-r--r-- | client/src/app/shared/shared-video-miniature/video-download.component.html | 147 |
1 files changed, 89 insertions, 58 deletions
diff --git a/client/src/app/shared/shared-video-miniature/video-download.component.html b/client/src/app/shared/shared-video-miniature/video-download.component.html index 0e659fbe2..8a9218343 100644 --- a/client/src/app/shared/shared-video-miniature/video-download.component.html +++ b/client/src/app/shared/shared-video-miniature/video-download.component.html | |||
@@ -17,22 +17,12 @@ | |||
17 | </div> | 17 | </div> |
18 | 18 | ||
19 | <div class="modal-body"> | 19 | <div class="modal-body"> |
20 | <div class="form-group"> | 20 | <div class="alert alert-warning" *ngIf="isConfidentialVideo()" i18n> |
21 | <div class="alert alert-warning" *ngIf="isConfidentialVideo()" i18n> | 21 | The following link contains a private token and should not be shared with anyone. |
22 | The following link contains a private token and should not be shared with anyone. | 22 | </div> |
23 | </div> | ||
24 | 23 | ||
24 | <ng-container *ngIf="type === 'subtitles'"> | ||
25 | <div class="input-group input-group-sm"> | 25 | <div class="input-group input-group-sm"> |
26 | <div class="input-group-prepend peertube-select-container"> | ||
27 | <select *ngIf="type === 'video'" [(ngModel)]="resolutionId" (ngModelChange)="onResolutionIdChange()"> | ||
28 | <option *ngFor="let file of getVideoFiles()" [value]="file.resolution.id">{{ file.resolution.label }}</option> | ||
29 | </select> | ||
30 | |||
31 | <select *ngIf="type === 'subtitles'" [(ngModel)]="subtitleLanguageId"> | ||
32 | <option *ngFor="let caption of videoCaptions" [value]="caption.language.id">{{ caption.language.label }}</option> | ||
33 | </select> | ||
34 | </div> | ||
35 | |||
36 | <input #urlInput (click)="urlInput.select()" type="text" class="form-control input-sm readonly" readonly [value]="getLink()" /> | 26 | <input #urlInput (click)="urlInput.select()" type="text" class="form-control input-sm readonly" readonly [value]="getLink()" /> |
37 | <div class="input-group-append" *ngIf="!isConfidentialVideo()"> | 27 | <div class="input-group-append" *ngIf="!isConfidentialVideo()"> |
38 | <button [cdkCopyToClipboard]="urlInput.value" (click)="activateCopiedMessage()" type="button" class="btn btn-outline-secondary"> | 28 | <button [cdkCopyToClipboard]="urlInput.value" (click)="activateCopiedMessage()" type="button" class="btn btn-outline-secondary"> |
@@ -40,62 +30,103 @@ | |||
40 | </button> | 30 | </button> |
41 | </div> | 31 | </div> |
42 | </div> | 32 | </div> |
43 | </div> | 33 | </ng-container> |
44 | 34 | ||
45 | <ng-container *ngIf="type === 'video' && videoFile?.metadata"> | 35 | <ng-container *ngIf="type === 'video'"> |
46 | <div ngbNav #nav="ngbNav" class="nav-tabs"> | 36 | <div ngbNav #resolutionNav="ngbNav" class="nav-tabs" [activeId]="resolutionId" (activeIdChange)="onResolutionIdChange($event)"> |
47 | 37 | ||
48 | <ng-container ngbNavItem> | 38 | <ng-container *ngFor="let file of getVideoFiles()" [ngbNavItem]="file.resolution.id"> |
49 | <a ngbNavLink i18n>Format</a> | 39 | <a ngbNavLink i18n>{{ file.resolution.label }}</a> |
40 | |||
50 | <ng-template ngbNavContent> | 41 | <ng-template ngbNavContent> |
51 | <div class="file-metadata"> | 42 | <div class="nav-content"> |
52 | <div class="metadata-attribute metadata-attribute-tags" *ngFor="let item of videoFileMetadataFormat | keyvalue"> | 43 | <div class="input-group input-group-sm"> |
53 | <span i18n class="metadata-attribute-label">{{ item.value.label }}</span> | 44 | <input #urlInput (click)="urlInput.select()" type="text" class="form-control input-sm readonly" readonly [value]="getLink()" /> |
54 | <span class="metadata-attribute-value">{{ item.value.value }}</span> | 45 | <div class="input-group-append" *ngIf="!isConfidentialVideo()"> |
46 | <button [cdkCopyToClipboard]="urlInput.value" (click)="activateCopiedMessage()" type="button" class="btn btn-outline-secondary"> | ||
47 | <span class="glyphicon glyphicon-duplicate"></span> | ||
48 | </button> | ||
49 | </div> | ||
55 | </div> | 50 | </div> |
56 | </div> | 51 | </div> |
57 | </ng-template> | 52 | </ng-template> |
58 | </ng-container> | 53 | </ng-container> |
59 | 54 | </div> | |
60 | <ng-container ngbNavItem [disabled]="videoFileMetadataVideoStream === undefined"> | 55 | <div [ngbNavOutlet]="resolutionNav"></div> |
61 | <a ngbNavLink i18n>Video stream</a> | 56 | |
62 | <ng-template ngbNavContent> | 57 | <div class="advanced-filters collapse-transition" [ngbCollapse]="isAdvancedCustomizationCollapsed"> |
63 | <div class="file-metadata"> | 58 | <ng-container *ngIf="videoFile?.metadata"> |
64 | <div class="metadata-attribute metadata-attribute-tags" *ngFor="let item of videoFileMetadataVideoStream | keyvalue"> | 59 | <div ngbNav #nav="ngbNav" class="nav-tabs nav-metadata"> |
65 | <span i18n class="metadata-attribute-label">{{ item.value.label }}</span> | 60 | <ng-container ngbNavItem> |
66 | <span class="metadata-attribute-value">{{ item.value.value }}</span> | 61 | <a ngbNavLink i18n>Format</a> |
67 | </div> | 62 | <ng-template ngbNavContent> |
63 | <div class="file-metadata"> | ||
64 | <div class="metadata-attribute metadata-attribute-tags" *ngFor="let item of videoFileMetadataFormat | keyvalue"> | ||
65 | <span i18n class="metadata-attribute-label">{{ item.value.label }}</span> | ||
66 | <span class="metadata-attribute-value">{{ item.value.value }}</span> | ||
67 | </div> | ||
68 | </div> | ||
69 | </ng-template> | ||
70 | |||
71 | <ng-container ngbNavItem [disabled]="videoFileMetadataVideoStream === undefined"> | ||
72 | <a ngbNavLink i18n>Video stream</a> | ||
73 | <ng-template ngbNavContent> | ||
74 | <div class="file-metadata"> | ||
75 | <div class="metadata-attribute metadata-attribute-tags" *ngFor="let item of videoFileMetadataVideoStream | keyvalue"> | ||
76 | <span i18n class="metadata-attribute-label">{{ item.value.label }}</span> | ||
77 | <span class="metadata-attribute-value">{{ item.value.value }}</span> | ||
78 | </div> | ||
79 | </div> | ||
80 | </ng-template> | ||
81 | </ng-container> | ||
82 | |||
83 | <ng-container ngbNavItem [disabled]="videoFileMetadataAudioStream === undefined"> | ||
84 | <a ngbNavLink i18n>Audio stream</a> | ||
85 | <ng-template ngbNavContent> | ||
86 | <div class="file-metadata"> | ||
87 | <div class="metadata-attribute metadata-attribute-tags" *ngFor="let item of videoFileMetadataAudioStream | keyvalue"> | ||
88 | <span i18n class="metadata-attribute-label">{{ item.value.label }}</span> | ||
89 | <span class="metadata-attribute-value">{{ item.value.value }}</span> | ||
90 | </div> | ||
91 | </div> | ||
92 | </ng-template> | ||
93 | </ng-container> | ||
94 | |||
95 | </ng-container> | ||
96 | </div> | ||
97 | <div [ngbNavOutlet]="nav"></div> | ||
98 | <div class="download-type"> | ||
99 | <div class="peertube-radio-container"> | ||
100 | <input type="radio" name="download" id="download-direct" [(ngModel)]="downloadType" value="direct"> | ||
101 | <label i18n for="download-direct">Direct download</label> | ||
68 | </div> | 102 | </div> |
69 | </ng-template> | 103 | <div class="peertube-radio-container"> |
70 | </ng-container> | 104 | <input type="radio" name="download" id="download-torrent" [(ngModel)]="downloadType" value="torrent"> |
71 | 105 | <label i18n for="download-torrent">Torrent (.torrent file)</label> | |
72 | <ng-container ngbNavItem [disabled]="videoFileMetadataAudioStream === undefined"> | ||
73 | <a ngbNavLink i18n>Audio stream</a> | ||
74 | <ng-template ngbNavContent> | ||
75 | <div class="file-metadata"> | ||
76 | <div class="metadata-attribute metadata-attribute-tags" *ngFor="let item of videoFileMetadataAudioStream | keyvalue"> | ||
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> | 106 | </div> |
81 | </ng-template> | 107 | </div> |
82 | </ng-container> | 108 | </ng-container> |
83 | </div> | 109 | </div> |
84 | 110 | ||
85 | <div [ngbNavOutlet]="nav"></div> | 111 | <div (click)="isAdvancedCustomizationCollapsed = !isAdvancedCustomizationCollapsed" role="button" class="advanced-filters-button" |
86 | </ng-container> | 112 | [attr.aria-expanded]="!isAdvancedCustomizationCollapsed" aria-controls="collapseBasic"> |
87 | 113 | <ng-container *ngIf="isAdvancedCustomizationCollapsed"> | |
88 | <div class="download-type" *ngIf="type === 'video'"> | 114 | <span class="glyphicon glyphicon-menu-down"></span> |
89 | <div class="peertube-radio-container"> | 115 | |
90 | <input type="radio" name="download" id="download-direct" [(ngModel)]="downloadType" value="direct"> | 116 | <ng-container i18n> |
91 | <label i18n for="download-direct">Direct download</label> | 117 | Advanced |
92 | </div> | 118 | </ng-container> |
93 | 119 | </ng-container> | |
94 | <div class="peertube-radio-container"> | 120 | |
95 | <input type="radio" name="download" id="download-torrent" [(ngModel)]="downloadType" value="torrent"> | 121 | <ng-container *ngIf="!isAdvancedCustomizationCollapsed"> |
96 | <label i18n for="download-torrent">Torrent (.torrent file)</label> | 122 | <span class="glyphicon glyphicon-menu-up"></span> |
123 | |||
124 | <ng-container i18n> | ||
125 | Simple | ||
126 | </ng-container> | ||
127 | </ng-container> | ||
97 | </div> | 128 | </div> |
98 | </div> | 129 | </ng-container> |
99 | </div> | 130 | </div> |
100 | 131 | ||
101 | <div class="modal-footer inputs"> | 132 | <div class="modal-footer inputs"> |