Skip to content

Commit

Permalink
Added Original Title to Movie Details and to Adding New Movie-Modal.
Browse files Browse the repository at this point in the history
Showing original title only conditionally
  • Loading branch information
ManiMatter committed Oct 6, 2024
1 parent 75c7a3c commit 4a4e786
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
margin-top: 20px;
}

.originalTitle,
.originalLanguage,
.studio,
.genres {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ interface CssExports {
'icons': string;
'links': string;
'originalLanguage': string;
'originalTitle': string;
'overlay': string;
'overview': string;
'poster': string;
Expand Down
16 changes: 16 additions & 0 deletions frontend/src/AddMovie/AddNewMovie/AddNewMovieSearchResult.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ class AddNewMovieSearchResult extends Component {
year,
studio,
originalLanguage,
originalTitle,
genres,
status,
overview,
Expand Down Expand Up @@ -228,6 +229,20 @@ class AddNewMovieSearchResult extends Component {
null
}

{
originalTitle && originalTitle !== title ?
<Label size={sizes.LARGE}>
<Icon
name={icons.FILM}
size={13}
/>
<span className={styles.originalTitle}>
{originalTitle}
</span>
</Label> :
null
}

{
studio ?
<Label size={sizes.LARGE}>
Expand Down Expand Up @@ -328,6 +343,7 @@ AddNewMovieSearchResult.propTypes = {
year: PropTypes.number.isRequired,
studio: PropTypes.string,
originalLanguage: PropTypes.object,
originalTitle: PropTypes.object,
genres: PropTypes.arrayOf(PropTypes.string),
status: PropTypes.string.isRequired,
overview: PropTypes.string,
Expand Down
16 changes: 15 additions & 1 deletion frontend/src/Movie/Details/MovieDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -440,8 +440,8 @@ class MovieDetails extends Component {
body={
<MovieReleaseDates
inCinemas={inCinemas}
digitalRelease={digitalRelease}
physicalRelease={physicalRelease}
digitalRelease={digitalRelease}
/>
}
position={tooltipPositions.BOTTOM}
Expand Down Expand Up @@ -625,6 +625,20 @@ class MovieDetails extends Component {
null
}

{
originalTitle && originalTitle !== title && !isSmallScreen ?
<InfoLabel
className={styles.detailsInfoLabel}
name={translate('OriginalTitle')}
size={sizes.LARGE}
>
<span className={styles.originalLanguage}>
{originalTitle}
</span>
</InfoLabel> :
null
}

{
studio && !isSmallScreen ?
<InfoLabel
Expand Down

0 comments on commit 4a4e786

Please sign in to comment.