diff options
Diffstat (limited to 'client/src/app/videos/+video-watch')
-rw-r--r-- | client/src/app/videos/+video-watch/video-watch.component.html | 2 | ||||
-rw-r--r-- | client/src/app/videos/+video-watch/video-watch.component.ts | 4 |
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 709eb91a8..1875230d8 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.html +++ b/client/src/app/videos/+video-watch/video-watch.component.html | |||
@@ -82,7 +82,7 @@ | |||
82 | </div> | 82 | </div> |
83 | 83 | ||
84 | <div ngbDropdownMenu> | 84 | <div ngbDropdownMenu> |
85 | <a class="dropdown-item" i18n-title title="Download the video" href="#" (click)="showDownloadModal($event)"> | 85 | <a *ngIf="isVideoDownloadable()" class="dropdown-item" i18n-title title="Download the video" href="#" (click)="showDownloadModal($event)"> |
86 | <my-global-icon iconName="download"></my-global-icon> <ng-container i18n>Download</ng-container> | 86 | <my-global-icon iconName="download"></my-global-icon> <ng-container i18n>Download</ng-container> |
87 | </a> | 87 | </a> |
88 | 88 | ||
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 e801f03ad..4dbfa41e5 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.ts +++ b/client/src/app/videos/+video-watch/video-watch.component.ts | |||
@@ -308,6 +308,10 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
308 | return this.video && this.video.state.id === VideoState.TO_TRANSCODE | 308 | return this.video && this.video.state.id === VideoState.TO_TRANSCODE |
309 | } | 309 | } |
310 | 310 | ||
311 | isVideoDownloadable () { | ||
312 | return this.video && this.video.downloadEnabled | ||
313 | } | ||
314 | |||
311 | isVideoToImport () { | 315 | isVideoToImport () { |
312 | return this.video && this.video.state.id === VideoState.TO_IMPORT | 316 | return this.video && this.video.state.id === VideoState.TO_IMPORT |
313 | } | 317 | } |