mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-01-06 06:41:40 +02:00
Fixed: Ended overlay on series posters
This commit is contained in:
parent
552fac0466
commit
d369d85699
@ -1,7 +1,3 @@
|
|||||||
.grid {
|
.grid {
|
||||||
flex: 1 0 auto;
|
flex: 1 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
|
||||||
padding: 10px;
|
|
||||||
}
|
|
||||||
|
@ -106,6 +106,7 @@ class SeriesIndexPosters extends Component {
|
|||||||
|
|
||||||
this._isInitialized = false;
|
this._isInitialized = false;
|
||||||
this._grid = null;
|
this._grid = null;
|
||||||
|
this._padding = props.isSmallScreen ? columnPaddingSmallScreen : columnPadding;
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidUpdate(prevProps, prevState) {
|
componentDidUpdate(prevProps, prevState) {
|
||||||
@ -113,7 +114,8 @@ class SeriesIndexPosters extends Component {
|
|||||||
items,
|
items,
|
||||||
sortKey,
|
sortKey,
|
||||||
posterOptions,
|
posterOptions,
|
||||||
jumpToCharacter
|
jumpToCharacter,
|
||||||
|
isSmallScreen
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
const {
|
const {
|
||||||
@ -125,7 +127,7 @@ class SeriesIndexPosters extends Component {
|
|||||||
|
|
||||||
if (prevProps.sortKey !== sortKey ||
|
if (prevProps.sortKey !== sortKey ||
|
||||||
prevProps.posterOptions !== posterOptions) {
|
prevProps.posterOptions !== posterOptions) {
|
||||||
this.calculateGrid();
|
this.calculateGrid(width, isSmallScreen);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._grid &&
|
if (this._grid &&
|
||||||
@ -165,10 +167,9 @@ class SeriesIndexPosters extends Component {
|
|||||||
posterOptions
|
posterOptions
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
const padding = isSmallScreen ? columnPaddingSmallScreen : columnPadding;
|
|
||||||
const columnWidth = calculateColumnWidth(width, posterOptions.size, isSmallScreen);
|
const columnWidth = calculateColumnWidth(width, posterOptions.size, isSmallScreen);
|
||||||
const columnCount = Math.max(Math.floor(width / columnWidth), 1);
|
const columnCount = Math.max(Math.floor(width / columnWidth), 1);
|
||||||
const posterWidth = columnWidth - padding;
|
const posterWidth = columnWidth - this._padding * 2;
|
||||||
const posterHeight = calculatePosterHeight(posterWidth);
|
const posterHeight = calculatePosterHeight(posterWidth);
|
||||||
const rowHeight = calculateRowHeight(posterHeight, sortKey, isSmallScreen, posterOptions);
|
const rowHeight = calculateRowHeight(posterHeight, sortKey, isSmallScreen, posterOptions);
|
||||||
|
|
||||||
@ -213,9 +214,11 @@ class SeriesIndexPosters extends Component {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={styles.container}
|
|
||||||
key={key}
|
key={key}
|
||||||
style={style}
|
style={{
|
||||||
|
...style,
|
||||||
|
padding: this._padding
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<SeriesIndexItemConnector
|
<SeriesIndexItemConnector
|
||||||
key={series.id}
|
key={series.id}
|
||||||
|
@ -47,7 +47,7 @@ module.exports = {
|
|||||||
modalBodyPadding: '30px',
|
modalBodyPadding: '30px',
|
||||||
|
|
||||||
// Series
|
// Series
|
||||||
seriesIndexColumnPadding: '20px',
|
seriesIndexColumnPadding: '10px',
|
||||||
seriesIndexColumnPaddingSmallScreen: '10px',
|
seriesIndexColumnPaddingSmallScreen: '5px',
|
||||||
seriesIndexOverviewInfoRowHeight: '21px'
|
seriesIndexOverviewInfoRowHeight: '21px'
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user