Skip to content

Commit

Permalink
Fixed: When adding a scene, the cover does not show
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom-Estes committed Apr 7, 2024
1 parent 66a14e5 commit 0674e8f
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@
flex: 0 0 170px;
margin-right: 20px;
height: 250px;
object-fit: cover;
}

.screenShot {
flex: 0 0 300px;
margin-right: 20px;
height: 169px;
object-fit: cover;
}

.info {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ interface CssExports {
'modalFooter': string;
'overview': string;
'poster': string;
'screenShot': string;
'searchForMissingMovieContainer': string;
'searchForMissingMovieInput': string;
'searchForMissingMovieLabel': string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import ModalFooter from 'Components/Modal/ModalFooter';
import ModalHeader from 'Components/Modal/ModalHeader';
import { inputTypes, kinds } from 'Helpers/Props';
import MoviePoster from 'Movie/MoviePoster';
import ScenePoster from 'Scene/ScenePoster';
import translate from 'Utilities/String/translate';
import styles from './AddNewMovieModalContent.css';

Expand Down Expand Up @@ -51,6 +52,8 @@ class AddNewMovieModalContent extends Component {
onInputChange
} = this.props;

const ImageComponent = images[0].coverType === 'poster' ? MoviePoster : ScenePoster;

return (
<ModalContent onModalClose={onModalClose}>
<ModalHeader>
Expand All @@ -66,14 +69,13 @@ class AddNewMovieModalContent extends Component {
<div className={styles.container}>
{
!isSmallScreen &&
<div className={styles.poster}>
<MoviePoster
blur={safeForWorkMode}
className={styles.poster}
images={images}
size={250}
/>
</div>
<ImageComponent
blur={safeForWorkMode}
className={images[0].coverType === 'poster' ? styles.poster : styles.screenShot}
images={images}
size={250}
lazy={false}
/>
}

<div className={styles.info}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
.poster {
flex: 0 0 170px;
margin-right: 20px;
width: 170px;
height: 250px;
object-fit: cover;
}

.info {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import ModalContent from 'Components/Modal/ModalContent';
import ModalFooter from 'Components/Modal/ModalFooter';
import ModalHeader from 'Components/Modal/ModalHeader';
import { inputTypes, kinds } from 'Helpers/Props';
import MoviePoster from 'Movie/MoviePoster';
import MovieHeadshot from 'Movie/MovieHeadshot';
import translate from 'Utilities/String/translate';
import styles from './AddNewPerformerModalContent.css';

Expand Down Expand Up @@ -59,11 +59,12 @@ class AddNewPerformerModalContent extends Component {
{
!isSmallScreen &&
<div className={styles.poster}>
<MoviePoster
<MovieHeadshot
blur={safeForWorkMode}
className={styles.poster}
images={images}
size={250}
overflow={true}
/>
</div>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@
}

.poster {
position: relative;
display: block;
flex: 0 0 170px;
margin-right: 20px;
width: 170px;
height: 250px;
object-fit: cover;
}

.content {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,6 @@ class AddNewPerformerSearchResult extends Component {

const linkProps = isExistingPerformer ? { to: `/performer/${foreignId}` } : { onPress: this.onPress };

const posterWidth = 167;
const posterHeight = 250;

const elementStyle = {
width: `${posterWidth}px`,
height: `${posterHeight}px`
};

return (
<div className={styles.searchResult}>
<Link
Expand All @@ -91,11 +83,9 @@ class AddNewPerformerSearchResult extends Component {
<MovieHeadshot
blur={safeForWorkMode}
className={styles.poster}
style={elementStyle}
images={images}
size={250}
overflow={true}
lazy={false}
/>
</div>
</div>
Expand Down

0 comments on commit 0674e8f

Please sign in to comment.