aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/video/video-actions-dropdown.component.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-05-13 11:18:24 +0200
committerChocobozzz <me@florianbigard.com>2019-05-13 11:19:29 +0200
commit72675ebe0181ab2389fb2f75a3b2acdca6e09c07 (patch)
tree65af2f9b50346175a83b3fa9e91d5f2dc0aee8eb /client/src/app/shared/video/video-actions-dropdown.component.ts
parent722bca907b6aa69c3b617221870451ccf436921a (diff)
downloadPeerTube-72675ebe0181ab2389fb2f75a3b2acdca6e09c07.tar.gz
PeerTube-72675ebe0181ab2389fb2f75a3b2acdca6e09c07.tar.zst
PeerTube-72675ebe0181ab2389fb2f75a3b2acdca6e09c07.zip
Move video watch playlist in its own component
Diffstat (limited to 'client/src/app/shared/video/video-actions-dropdown.component.ts')
-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 {