Fixed: Show year in collection movies as labels

This commit is contained in:
Bogdan 2023-10-08 06:11:44 +03:00
parent b14e93e11f
commit f7313369b5
4 changed files with 8 additions and 9 deletions

View File

@ -124,7 +124,7 @@ class CollectionMovie extends Component {
<div className={styles.overlay}>
<div className={styles.overlayTitle}>
{title} { year > 0 ? `(${year})` : ''}
{title} {year > 0 ? `(${year})` : ''}
</div>
{

View File

@ -5,7 +5,7 @@
margin: 2px 4px;
border: 1px solid var(--borderColor);
border-radius: 4px;
background-color: #eee;
background-color: var(--inputBackgroundColor);
cursor: default;
}
@ -17,7 +17,7 @@
padding: 0 4px;
border-left: 4px;
border-left-style: solid;
background-color: var(--white);
background-color: var(--themeLightColor);
color: var(--defaultColor);
}

View File

@ -14,6 +14,7 @@ class CollectionMovieLabel extends Component {
const {
id,
title,
year,
status,
monitored,
isAvailable,
@ -35,9 +36,7 @@ class CollectionMovieLabel extends Component {
}
<span>
{
title
}
{title} {year > 0 ? `(${year})` : ''}
</span>
</div>
@ -62,6 +61,7 @@ class CollectionMovieLabel extends Component {
CollectionMovieLabel.propTypes = {
id: PropTypes.number,
title: PropTypes.string.isRequired,
year: PropTypes.number.isRequired,
status: PropTypes.string,
isAvailable: PropTypes.bool,
monitored: PropTypes.bool,

View File

@ -28,7 +28,6 @@ function calculatePosterWidth(posterSize, isSmallScreen) {
}
function calculateRowHeight(posterHeight, sortKey, isSmallScreen, overviewOptions) {
const heights = [
overviewOptions.showPosters ? posterHeight : 75,
isSmallScreen ? columnPaddingSmallScreen : columnPadding
@ -122,8 +121,8 @@ class CollectionOverviews extends Component {
overviewOptions
} = this.props;
const posterWidth = calculatePosterWidth(overviewOptions.size, isSmallScreen);
const posterHeight = calculatePosterHeight(posterWidth);
const posterWidth = overviewOptions.showPosters ? calculatePosterWidth(overviewOptions.size, isSmallScreen) : 0;
const posterHeight = overviewOptions.showPosters ? calculatePosterHeight(posterWidth) : 0;
const rowHeight = calculateRowHeight(posterHeight, sortKey, isSmallScreen, overviewOptions);
this.setState({