From ddcacbb6e5519b12842476a2c0651f35ce35f8cd Mon Sep 17 00:00:00 2001 From: Deluan Date: Wed, 6 May 2020 08:42:43 -0400 Subject: [PATCH] Fix covers overflow in some resolutions --- ui/src/album/AlbumGridView.js | 9 +++------ ui/src/album/AlbumList.js | 5 ++--- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/ui/src/album/AlbumGridView.js b/ui/src/album/AlbumGridView.js index 06687b19..366ee14d 100644 --- a/ui/src/album/AlbumGridView.js +++ b/ui/src/album/AlbumGridView.js @@ -13,10 +13,6 @@ const useStyles = makeStyles((theme) => ({ root: { margin: '20px', }, - gridListTile: { - minHeight: '180px', - minWidth: '180px', - }, tileBar: { textAlign: 'left', background: @@ -44,8 +40,9 @@ const useCoverStyles = makeStyles({ const getColsForWidth = (width) => { if (width === 'xs') return 2 - if (width === 'sm') return 4 - if (width === 'md') return 5 + if (width === 'sm') return 3 + if (width === 'md') return 4 + if (width === 'lg') return 6 return 6 } diff --git a/ui/src/album/AlbumList.js b/ui/src/album/AlbumList.js index 7a9c56b0..2ec206c5 100644 --- a/ui/src/album/AlbumList.js +++ b/ui/src/album/AlbumList.js @@ -50,9 +50,8 @@ const getPerPageOptions = (width) => { const options = [3, 6, 12] if (width === 'xs') return [12] if (width === 'sm') return [12] - if (width === 'md') return options.map((v) => v * 5) - if (width === 'lg') return options.map((v) => v * 6) - return options.map((v) => v * 7) + if (width === 'md') return options.map((v) => v * 4) + return options.map((v) => v * 6) } const AlbumList = (props) => {