From 6eb62c33908025d877a28f1cfbc527c511ae3103 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 22 Aug 2019 13:59:54 +0200 Subject: Fix video rows overflow In discover and account channel videos pages --- .../account-video-channels/account-video-channels.component.scss | 1 - .../account-video-channels/account-video-channels.component.ts | 9 +++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'client/src/app/+accounts') diff --git a/client/src/app/+accounts/account-video-channels/account-video-channels.component.scss b/client/src/app/+accounts/account-video-channels/account-video-channels.component.scss index 7f7652460..a258c7b86 100644 --- a/client/src/app/+accounts/account-video-channels/account-video-channels.component.scss +++ b/client/src/app/+accounts/account-video-channels/account-video-channels.component.scss @@ -9,7 +9,6 @@ .section { @include miniature-rows; - overflow: visible; // For the subscribe dropdown padding-top: 0 !important; .section-title { 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' import { VideoService } from '@app/shared/video/video.service' import { VideoSortField } from '@app/shared/video/sort-field.type' import { ComponentPagination, hasMoreItems } from '@app/shared/rest/component-pagination.model' +import { ScreenService } from '@app/shared/misc/screen.service' @Component({ selector: 'my-account-video-channels', @@ -42,7 +43,8 @@ export class AccountVideoChannelsComponent implements OnInit, OnDestroy { private authService: AuthService, private accountService: AccountService, private videoChannelService: VideoChannelService, - private videoService: VideoService + private videoService: VideoService, + private screenService: ScreenService ) { } get user () { @@ -83,7 +85,10 @@ export class AccountVideoChannelsComponent implements OnInit, OnDestroy { } getVideosOf (videoChannel: VideoChannel) { - return this.videos[ videoChannel.id ] + const numberOfVideos = this.screenService.getNumberOfAvailableMiniatures() + + // 2 rows + return this.videos[ videoChannel.id ].slice(0, numberOfVideos * 2) } onNearOfBottom () { -- cgit v1.2.3