From d961b247f7090b5ff0a712fcb319424422dacd57 Mon Sep 17 00:00:00 2001 From: plz12345 <132735020+plz12345@users.noreply.github.com> Date: Sat, 16 Mar 2024 13:19:59 -0400 Subject: [PATCH] Fixed: Performer image scaling Lint fixes --- .../Details/Credits/Cast/MovieCastPoster.js | 12 +- .../Performer/Details/PerformerDetails.css | 4 +- .../src/Performer/Details/PerformerDetails.js | 126 +++++++++--------- .../Index/Posters/PerformerIndexPoster.tsx | 1 + 4 files changed, 70 insertions(+), 73 deletions(-) diff --git a/frontend/src/Movie/Details/Credits/Cast/MovieCastPoster.js b/frontend/src/Movie/Details/Credits/Cast/MovieCastPoster.js index a6526ec324..4a2bb93a21 100644 --- a/frontend/src/Movie/Details/Credits/Cast/MovieCastPoster.js +++ b/frontend/src/Movie/Details/Credits/Cast/MovieCastPoster.js @@ -53,7 +53,8 @@ class MovieCastPoster extends Component { const elementStyle = { width: `${posterWidth}px`, height: `${posterHeight}px`, - borderRadius: '5px' + borderRadius: '5px', + 'object-fit': 'cover' }; const contentStyle = { @@ -93,11 +94,10 @@ class MovieCastPoster extends Component { onLoad={this.onPosterLoad} /> - { - hasPosterError && -
- {performer.fullName} -
+ {hasPosterError && +
+ {performer.fullName} +
} diff --git a/frontend/src/Performer/Details/PerformerDetails.css b/frontend/src/Performer/Details/PerformerDetails.css index 88cb5cde28..7cfdbb3091 100644 --- a/frontend/src/Performer/Details/PerformerDetails.css +++ b/frontend/src/Performer/Details/PerformerDetails.css @@ -41,7 +41,7 @@ .poster { z-index: 2; flex-shrink: 0; - margin-right: 35px; + margin-right: 30px; width: 217px; height: 319px; } @@ -216,4 +216,4 @@ .details { font-size: 19px; } -} +} \ No newline at end of file diff --git a/frontend/src/Performer/Details/PerformerDetails.js b/frontend/src/Performer/Details/PerformerDetails.js index 6c6b66ea0f..f84de6d9ff 100644 --- a/frontend/src/Performer/Details/PerformerDetails.js +++ b/frontend/src/Performer/Details/PerformerDetails.js @@ -236,6 +236,9 @@ class PerformerDetails extends Component { const runningYears = statusDetails.title === translate('Inactive') ? `${careerStart}-${careerEnd}` : `${careerStart}-`; const fanartUrl = getFanartUrl(images); + const elementStyle = { + 'object-fit': 'cover' + }; return ( @@ -293,6 +296,7 @@ class PerformerDetails extends Component {
- { - !!gender && - - {firstCharToUpper(gender)} - + {!!gender && + + {firstCharToUpper(gender)} + } - { - !!ethnicity && - - {firstCharToUpper(ethnicity)} - + {!!ethnicity && + + {firstCharToUpper(ethnicity)} + } - { - !!careerStart && - - {runningYears} - + {!!careerStart && + + {runningYears} + } { @@ -379,22 +380,21 @@ class PerformerDetails extends Component { } - { - !!tags.length && - - - } - tooltip={ - - } - position={tooltipPositions.BOTTOM} - /> - + {!!tags.length && + + + } + tooltip={ + + } + position={tooltipPositions.BOTTOM} + /> + }
@@ -489,17 +489,16 @@ class PerformerDetails extends Component { position={tooltipPositions.BOTTOM} /> - { - !!genres.length && !isSmallScreen && - + {!!genres.length && !isSmallScreen && + } @@ -523,29 +522,26 @@ class PerformerDetails extends Component { null } - { - !isFetching && isPopulated && hasScenes ? -
- { - isPopulated && !!studios.length && -
- { - studios.map((studio) => { - return ( - - ); - }) - } -
- } -
: - null + {!isFetching && isPopulated && hasScenes ? +
+ {isPopulated && !!studios.length && +
+ {studios.map((studio) => { + return ( + + ); + }) + } +
+ } +
: + null } diff --git a/frontend/src/Performer/Index/Posters/PerformerIndexPoster.tsx b/frontend/src/Performer/Index/Posters/PerformerIndexPoster.tsx index c1ed102bdf..5db0603fa4 100644 --- a/frontend/src/Performer/Index/Posters/PerformerIndexPoster.tsx +++ b/frontend/src/Performer/Index/Posters/PerformerIndexPoster.tsx @@ -64,6 +64,7 @@ function PerformerIndexPoster(props: PerformerIndexPosterProps) { const elementStyle = { width: `${posterWidth}px`, height: `${posterHeight}px`, + 'object-fit': 'cover', }; return (