diff options
Diffstat (limited to 'client/src/app/shared')
-rw-r--r-- | client/src/app/shared/video-playlist/video-playlist-element-miniature.component.scss | 14 | ||||
-rw-r--r-- | client/src/app/shared/video/video-actions-dropdown.component.ts | 8 |
2 files changed, 13 insertions, 9 deletions
diff --git a/client/src/app/shared/video-playlist/video-playlist-element-miniature.component.scss b/client/src/app/shared/video-playlist/video-playlist-element-miniature.component.scss index f8a068cbc..cb7072d7f 100644 --- a/client/src/app/shared/video-playlist/video-playlist-element-miniature.component.scss +++ b/client/src/app/shared/video-playlist/video-playlist-element-miniature.component.scss | |||
@@ -2,6 +2,13 @@ | |||
2 | @import '_mixins'; | 2 | @import '_mixins'; |
3 | @import '_miniature'; | 3 | @import '_miniature'; |
4 | 4 | ||
5 | my-video-thumbnail { | ||
6 | @include thumbnail-size-component(130px, 72px); | ||
7 | |||
8 | display: flex; // Avoids an issue with line-height that adds space below the element | ||
9 | margin-right: 10px; | ||
10 | } | ||
11 | |||
5 | .video { | 12 | .video { |
6 | display: flex; | 13 | display: flex; |
7 | align-items: center; | 14 | align-items: center; |
@@ -44,13 +51,6 @@ | |||
44 | } | 51 | } |
45 | } | 52 | } |
46 | 53 | ||
47 | my-video-thumbnail { | ||
48 | @include thumbnail-size-component(130px, 72px); | ||
49 | |||
50 | display: flex; // Avoids an issue with line-height that adds space below the element | ||
51 | margin-right: 10px; | ||
52 | } | ||
53 | |||
54 | .video-info { | 54 | .video-info { |
55 | display: flex; | 55 | display: flex; |
56 | flex-direction: column; | 56 | flex-direction: column; |
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 | { |