aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/video
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/video')
-rw-r--r--client/src/app/shared/video/video-actions-dropdown.component.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/client/src/app/shared/video/video-actions-dropdown.component.ts b/client/src/app/shared/video/video-actions-dropdown.component.ts
index b2d77a9e6..c1da0eba6 100644
--- a/client/src/app/shared/video/video-actions-dropdown.component.ts
+++ b/client/src/app/shared/video/video-actions-dropdown.component.ts
@@ -1,4 +1,4 @@
1import { AfterContentInit, AfterViewInit, Component, EventEmitter, Input, OnChanges, OnInit, Output, ViewChild } from '@angular/core' 1import { AfterViewInit, Component, EventEmitter, Input, OnChanges, Output, ViewChild } from '@angular/core'
2import { I18n } from '@ngx-translate/i18n-polyfill' 2import { I18n } from '@ngx-translate/i18n-polyfill'
3import { DropdownAction, DropdownButtonSize, DropdownDirection } from '@app/shared/buttons/action-dropdown.component' 3import { DropdownAction, DropdownButtonSize, DropdownDirection } from '@app/shared/buttons/action-dropdown.component'
4import { AuthService, ConfirmService, Notifier, ServerService } from '@app/core' 4import { AuthService, ConfirmService, Notifier, ServerService } from '@app/core'
@@ -133,6 +133,10 @@ export class VideoActionsDropdownComponent implements AfterViewInit, OnChanges {
133 return this.video.isUnblacklistableBy(this.user) 133 return this.video.isUnblacklistableBy(this.user)
134 } 134 }
135 135
136 isVideoDownloadable () {
137 return this.video && this.video instanceof VideoDetails && this.video.downloadEnabled
138 }
139
136 /* Action handlers */ 140 /* Action handlers */
137 141
138 async unblacklistVideo () { 142 async unblacklistVideo () {
@@ -202,7 +206,7 @@ export class VideoActionsDropdownComponent implements AfterViewInit, OnChanges {
202 { 206 {
203 label: this.i18n('Download'), 207 label: this.i18n('Download'),
204 handler: () => this.showDownloadModal(), 208 handler: () => this.showDownloadModal(),
205 isDisplayed: () => this.displayOptions.download, 209 isDisplayed: () => this.displayOptions.download && this.isVideoDownloadable(),
206 iconName: 'download' 210 iconName: 'download'
207 }, 211 },
208 { 212 {