diff options
author | Chocobozzz <me@florianbigard.com> | 2019-05-13 11:18:24 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-05-13 11:19:29 +0200 |
commit | 72675ebe0181ab2389fb2f75a3b2acdca6e09c07 (patch) | |
tree | 65af2f9b50346175a83b3fa9e91d5f2dc0aee8eb /client/src/app/shared/video | |
parent | 722bca907b6aa69c3b617221870451ccf436921a (diff) | |
download | PeerTube-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')
-rw-r--r-- | client/src/app/shared/video/video-actions-dropdown.component.ts | 8 |
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 @@ | |||
1 | import { AfterContentInit, AfterViewInit, Component, EventEmitter, Input, OnChanges, OnInit, Output, ViewChild } from '@angular/core' | 1 | import { AfterViewInit, Component, EventEmitter, Input, OnChanges, Output, ViewChild } from '@angular/core' |
2 | import { I18n } from '@ngx-translate/i18n-polyfill' | 2 | import { I18n } from '@ngx-translate/i18n-polyfill' |
3 | import { DropdownAction, DropdownButtonSize, DropdownDirection } from '@app/shared/buttons/action-dropdown.component' | 3 | import { DropdownAction, DropdownButtonSize, DropdownDirection } from '@app/shared/buttons/action-dropdown.component' |
4 | import { AuthService, ConfirmService, Notifier, ServerService } from '@app/core' | 4 | import { 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 | { |