diff options
author | Chocobozzz <me@florianbigard.com> | 2021-04-01 11:10:27 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-04-01 16:54:49 +0200 |
commit | 0f7407d926cf7774f8f730dba08327569c11680c (patch) | |
tree | 6b44be72187390514d9068b78851b48b1a9b7244 /client/src/app/shared/shared-video-miniature/video-miniature.component.ts | |
parent | 33253c1aa6b82284ddd0a9cb516ad85e276ca3a3 (diff) | |
download | PeerTube-0f7407d926cf7774f8f730dba08327569c11680c.tar.gz PeerTube-0f7407d926cf7774f8f730dba08327569c11680c.tar.zst PeerTube-0f7407d926cf7774f8f730dba08327569c11680c.zip |
Refactor video miniature
Less dirty code, better responsive
Prepare for some regressions
Increase default miniature size
Diffstat (limited to 'client/src/app/shared/shared-video-miniature/video-miniature.component.ts')
-rw-r--r-- | client/src/app/shared/shared-video-miniature/video-miniature.component.ts | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/client/src/app/shared/shared-video-miniature/video-miniature.component.ts b/client/src/app/shared/shared-video-miniature/video-miniature.component.ts index 987a65e40..48da92d6b 100644 --- a/client/src/app/shared/shared-video-miniature/video-miniature.component.ts +++ b/client/src/app/shared/shared-video-miniature/video-miniature.component.ts | |||
@@ -16,7 +16,6 @@ import { Video } from '../shared-main' | |||
16 | import { VideoPlaylistService } from '../shared-video-playlist' | 16 | import { VideoPlaylistService } from '../shared-video-playlist' |
17 | import { VideoActionsDisplayType } from './video-actions-dropdown.component' | 17 | import { VideoActionsDisplayType } from './video-actions-dropdown.component' |
18 | 18 | ||
19 | export type OwnerDisplayType = 'account' | 'videoChannel' | ||
20 | export type MiniatureDisplayOptions = { | 19 | export type MiniatureDisplayOptions = { |
21 | date?: boolean | 20 | date?: boolean |
22 | views?: boolean | 21 | views?: boolean |
@@ -50,9 +49,9 @@ export class VideoMiniatureComponent implements OnInit { | |||
50 | state: false, | 49 | state: false, |
51 | blacklistInfo: false | 50 | blacklistInfo: false |
52 | } | 51 | } |
53 | @Input() displayAsRow = false | ||
54 | @Input() displayVideoActions = true | 52 | @Input() displayVideoActions = true |
55 | @Input() fitWidth = false | 53 | |
54 | @Input() displayAsRow = false | ||
56 | 55 | ||
57 | @Input() videoLinkType: VideoLinkType = 'internal' | 56 | @Input() videoLinkType: VideoLinkType = 'internal' |
58 | 57 | ||
@@ -243,6 +242,12 @@ export class VideoMiniatureComponent implements OnInit { | |||
243 | return this.displayVideoActions && this.isUserLoggedIn() && this.inWatchLaterPlaylist !== undefined | 242 | return this.displayVideoActions && this.isUserLoggedIn() && this.inWatchLaterPlaylist !== undefined |
244 | } | 243 | } |
245 | 244 | ||
245 | getClasses () { | ||
246 | return { | ||
247 | 'display-as-row': this.displayAsRow | ||
248 | } | ||
249 | } | ||
250 | |||
246 | private setUpBy () { | 251 | private setUpBy () { |
247 | const accountName = this.video.account.name | 252 | const accountName = this.video.account.name |
248 | 253 | ||