ActivityPub-federated video streaming platform using P2P directly in your web browser
Add warning in download modal if needed
Chocobozzz51294901cf2b
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.htmlindex 45ba555af8..4608e93e75 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@@ -18,6 +18,10 @@<div class="modal-body"><div class="form-group">+ <div class="alert alert-warning" *ngIf="isConfidentialVideo()" i18n>+ The following link contains a private token and should not be shared with anyone.+ </div>+<div class="input-group input-group-sm"><div class="input-group-prepend peertube-select-container"><select *ngIf="type === 'video'" [(ngModel)]="resolutionId" (ngModelChange)="onResolutionIdChange()">@@ -30,7 +34,7 @@</div><input #urlInput (click)="urlInput.select()" type="text" class="form-control input-sm readonly" readonly [value]="getLink()" />- <div class="input-group-append">+ <div class="input-group-append" *ngIf="!isConfidentialVideo()"><button [cdkCopyToClipboard]="urlInput.value" (click)="activateCopiedMessage()" type="button" class="btn btn-outline-secondary"><span class="glyphicon glyphicon-copy"></span></button>diff --git a/client/src/app/shared/shared-video-miniature/video-download.component.ts b/client/src/app/shared/shared-video-miniature/video-download.component.tsindex 70b27b1054..90f4daf7c9 100644--- a/client/src/app/shared/shared-video-miniature/video-download.component.ts+++ b/client/src/app/shared/shared-video-miniature/video-download.component.ts@@ -116,7 +116,7 @@ export class VideoDownloadComponent {const file = this.videoFileif (!file) return- const suffix = this.video.privacy.id === VideoPrivacy.PRIVATE || this.video.privacy.id === VideoPrivacy.INTERNAL+ const suffix = this.isConfidentialVideo()? '?access_token=' + this.auth.getAccessToken(): ''@@ -129,6 +129,10 @@ export class VideoDownloadComponent {}}+ isConfidentialVideo () {+ return this.video.privacy.id === VideoPrivacy.PRIVATE || this.video.privacy.id === VideoPrivacy.INTERNAL+ }+getSubtitlesLink () {return window.location.origin + this.videoCaptions.find(caption => caption.language.id === this.subtitleLanguageId).captionPath}