Add certification and runtime to search results (#6154)

pull/6181/head
nitsua 4 years ago committed by GitHub
parent f883cab6db
commit 398fc4dca2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -103,3 +103,10 @@
overflow: hidden; overflow: hidden;
} }
} }
.certification {
margin-right: 5px;
padding: 0 5px;
border: 1px solid;
border-radius: 5px;
}

@ -10,6 +10,7 @@ import MovieDetailsLinks from 'Movie/Details/MovieDetailsLinks';
import MovieStatusLabel from 'Movie/Details/MovieStatusLabel'; import MovieStatusLabel from 'Movie/Details/MovieStatusLabel';
import MovieIndexProgressBar from 'Movie/Index/ProgressBar/MovieIndexProgressBar'; import MovieIndexProgressBar from 'Movie/Index/ProgressBar/MovieIndexProgressBar';
import MoviePoster from 'Movie/MoviePoster'; import MoviePoster from 'Movie/MoviePoster';
import formatRuntime from 'Utilities/Date/formatRuntime';
import translate from 'Utilities/String/translate'; import translate from 'Utilities/String/translate';
import AddNewMovieModal from './AddNewMovieModal'; import AddNewMovieModal from './AddNewMovieModal';
import styles from './AddNewMovieSearchResult.css'; import styles from './AddNewMovieSearchResult.css';
@ -74,7 +75,10 @@ class AddNewMovieSearchResult extends Component {
hasFile, hasFile,
isAvailable, isAvailable,
queueStatus, queueStatus,
queueState queueState,
runtime,
movieRuntimeFormat,
certification
} = this.props; } = this.props;
const { const {
@ -160,6 +164,22 @@ class AddNewMovieSearchResult extends Component {
</div> </div>
</div> </div>
<div>
{
!!certification &&
<span className={styles.certification}>
{certification}
</span>
}
{
!!runtime &&
<span>
{formatRuntime(runtime, movieRuntimeFormat)}
</span>
}
</div>
<div> <div>
<Label size={sizes.LARGE}> <Label size={sizes.LARGE}>
<HeartRating <HeartRating
@ -259,7 +279,10 @@ AddNewMovieSearchResult.propTypes = {
isAvailable: PropTypes.bool.isRequired, isAvailable: PropTypes.bool.isRequired,
colorImpairedMode: PropTypes.bool, colorImpairedMode: PropTypes.bool,
queueStatus: PropTypes.string, queueStatus: PropTypes.string,
queueState: PropTypes.string queueState: PropTypes.string,
runtime: PropTypes.number.isRequired,
movieRuntimeFormat: PropTypes.string.isRequired,
certification: PropTypes.string
}; };
export default AddNewMovieSearchResult; export default AddNewMovieSearchResult;

Loading…
Cancel
Save