aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/+video-watch
diff options
context:
space:
mode:
authorLucas Declercq <lucas.declercq@ineat-conseil.fr>2018-10-06 19:17:21 +0200
committerLucas Declercq <lucas.declercq@ineat-conseil.fr>2018-10-06 19:17:39 +0200
commit156c50af3085468a47b8ae73fe8cfcae46b42398 (patch)
treef316355ebea2550c201a880cfc9f9b724bf0f7fd /client/src/app/videos/+video-watch
parent35d50b7dd26b3cf646b8845784927bb1ef18dfb3 (diff)
downloadPeerTube-156c50af3085468a47b8ae73fe8cfcae46b42398.tar.gz
PeerTube-156c50af3085468a47b8ae73fe8cfcae46b42398.tar.zst
PeerTube-156c50af3085468a47b8ae73fe8cfcae46b42398.zip
Add downloadingEnabled property to video model
Diffstat (limited to 'client/src/app/videos/+video-watch')
-rw-r--r--client/src/app/videos/+video-watch/video-watch.component.html2
-rw-r--r--client/src/app/videos/+video-watch/video-watch.component.ts4
2 files changed, 5 insertions, 1 deletions
diff --git a/client/src/app/videos/+video-watch/video-watch.component.html b/client/src/app/videos/+video-watch/video-watch.component.html
index 770785d02..ba04d638f 100644
--- a/client/src/app/videos/+video-watch/video-watch.component.html
+++ b/client/src/app/videos/+video-watch/video-watch.component.html
@@ -80,7 +80,7 @@
80 </div> 80 </div>
81 81
82 <div ngbDropdownMenu> 82 <div ngbDropdownMenu>
83 <a class="dropdown-item" i18n-title title="Download the video" href="#" (click)="showDownloadModal($event)"> 83 <a *ngIf="isVideoDownloadable()" class="dropdown-item" i18n-title title="Download the video" href="#" (click)="showDownloadModal($event)">
84 <span class="icon icon-download"></span> <ng-container i18n>Download</ng-container> 84 <span class="icon icon-download"></span> <ng-container i18n>Download</ng-container>
85 </a> 85 </a>
86 86
diff --git a/client/src/app/videos/+video-watch/video-watch.component.ts b/client/src/app/videos/+video-watch/video-watch.component.ts
index c5deddf05..7cc831ab1 100644
--- a/client/src/app/videos/+video-watch/video-watch.component.ts
+++ b/client/src/app/videos/+video-watch/video-watch.component.ts
@@ -313,6 +313,10 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
313 return this.video && this.video.state.id === VideoState.TO_TRANSCODE 313 return this.video && this.video.state.id === VideoState.TO_TRANSCODE
314 } 314 }
315 315
316 isVideoDownloadable () {
317 return this.video && this.video.downloadingEnabled
318 }
319
316 isVideoToImport () { 320 isVideoToImport () {
317 return this.video && this.video.state.id === VideoState.TO_IMPORT 321 return this.video && this.video.state.id === VideoState.TO_IMPORT
318 } 322 }