diff options
author | Chocobozzz <me@florianbigard.com> | 2019-08-22 13:59:54 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-08-22 13:59:54 +0200 |
commit | 6eb62c33908025d877a28f1cfbc527c511ae3103 (patch) | |
tree | 90544c222a721e878ee69f0a15a339d4dc67cb18 /client/src/app/+accounts/account-video-channels/account-video-channels.component.ts | |
parent | a3671f0709f3f423819fcfed47a4d4879cf82780 (diff) | |
download | PeerTube-6eb62c33908025d877a28f1cfbc527c511ae3103.tar.gz PeerTube-6eb62c33908025d877a28f1cfbc527c511ae3103.tar.zst PeerTube-6eb62c33908025d877a28f1cfbc527c511ae3103.zip |
Fix video rows overflow
In discover and account channel videos pages
Diffstat (limited to 'client/src/app/+accounts/account-video-channels/account-video-channels.component.ts')
-rw-r--r-- | client/src/app/+accounts/account-video-channels/account-video-channels.component.ts | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/client/src/app/+accounts/account-video-channels/account-video-channels.component.ts b/client/src/app/+accounts/account-video-channels/account-video-channels.component.ts index 85dedd7de..29d2991fd 100644 --- a/client/src/app/+accounts/account-video-channels/account-video-channels.component.ts +++ b/client/src/app/+accounts/account-video-channels/account-video-channels.component.ts | |||
@@ -11,6 +11,7 @@ import { AuthService } from '@app/core' | |||
11 | import { VideoService } from '@app/shared/video/video.service' | 11 | import { VideoService } from '@app/shared/video/video.service' |
12 | import { VideoSortField } from '@app/shared/video/sort-field.type' | 12 | import { VideoSortField } from '@app/shared/video/sort-field.type' |
13 | import { ComponentPagination, hasMoreItems } from '@app/shared/rest/component-pagination.model' | 13 | import { ComponentPagination, hasMoreItems } from '@app/shared/rest/component-pagination.model' |
14 | import { ScreenService } from '@app/shared/misc/screen.service' | ||
14 | 15 | ||
15 | @Component({ | 16 | @Component({ |
16 | selector: 'my-account-video-channels', | 17 | selector: 'my-account-video-channels', |
@@ -42,7 +43,8 @@ export class AccountVideoChannelsComponent implements OnInit, OnDestroy { | |||
42 | private authService: AuthService, | 43 | private authService: AuthService, |
43 | private accountService: AccountService, | 44 | private accountService: AccountService, |
44 | private videoChannelService: VideoChannelService, | 45 | private videoChannelService: VideoChannelService, |
45 | private videoService: VideoService | 46 | private videoService: VideoService, |
47 | private screenService: ScreenService | ||
46 | ) { } | 48 | ) { } |
47 | 49 | ||
48 | get user () { | 50 | get user () { |
@@ -83,7 +85,10 @@ export class AccountVideoChannelsComponent implements OnInit, OnDestroy { | |||
83 | } | 85 | } |
84 | 86 | ||
85 | getVideosOf (videoChannel: VideoChannel) { | 87 | getVideosOf (videoChannel: VideoChannel) { |
86 | return this.videos[ videoChannel.id ] | 88 | const numberOfVideos = this.screenService.getNumberOfAvailableMiniatures() |
89 | |||
90 | // 2 rows | ||
91 | return this.videos[ videoChannel.id ].slice(0, numberOfVideos * 2) | ||
87 | } | 92 | } |
88 | 93 | ||
89 | onNearOfBottom () { | 94 | onNearOfBottom () { |