mirror of https://github.com/Chocobozzz/PeerTube
Add warning in download modal if needed
parent
e6ea0cac44
commit
51294901cf
|
@ -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>
|
||||
|
|
|
@ -116,7 +116,7 @@ export class VideoDownloadComponent {
|
|||
const file = this.videoFile
|
||||
if (!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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue