diff --git a/frontend/src/Artist/Details/ArtistDetails.js b/frontend/src/Artist/Details/ArtistDetails.js index ab40a8f92..ecc901330 100644 --- a/frontend/src/Artist/Details/ArtistDetails.js +++ b/frontend/src/Artist/Details/ArtistDetails.js @@ -36,6 +36,7 @@ import InteractiveImportModal from '../../InteractiveImport/InteractiveImportMod import ArtistAlternateTitles from './ArtistAlternateTitles'; import ArtistDetailsLinks from './ArtistDetailsLinks'; import ArtistDetailsSeasonConnector from './ArtistDetailsSeasonConnector'; +import ArtistGenres from './ArtistGenres'; import ArtistTagsConnector from './ArtistTagsConnector'; import styles from './ArtistDetails.css'; @@ -187,6 +188,7 @@ class ArtistDetails extends Component { statistics, qualityProfileId, monitored, + genres, albumTypes, status, overview, @@ -431,6 +433,8 @@ class ArtistDetails extends Component { rating={ratings.value} iconSize={20} /> + + @@ -695,6 +699,7 @@ ArtistDetails.propTypes = { monitored: PropTypes.bool.isRequired, artistType: PropTypes.string, albumTypes: PropTypes.arrayOf(PropTypes.string), + genres: PropTypes.arrayOf(PropTypes.string), status: PropTypes.string.isRequired, overview: PropTypes.string.isRequired, links: PropTypes.arrayOf(PropTypes.object).isRequired, diff --git a/frontend/src/Artist/Details/ArtistGenres.css b/frontend/src/Artist/Details/ArtistGenres.css new file mode 100644 index 000000000..93a028748 --- /dev/null +++ b/frontend/src/Artist/Details/ArtistGenres.css @@ -0,0 +1,3 @@ +.genres { + margin-right: 15px; +} diff --git a/frontend/src/Artist/Details/ArtistGenres.js b/frontend/src/Artist/Details/ArtistGenres.js new file mode 100644 index 000000000..15f3505d8 --- /dev/null +++ b/frontend/src/Artist/Details/ArtistGenres.js @@ -0,0 +1,53 @@ +import PropTypes from 'prop-types'; +import React from 'react'; +import Label from 'Components/Label'; +import Tooltip from 'Components/Tooltip/Tooltip'; +import { kinds, sizes, tooltipPositions } from 'Helpers/Props'; +import styles from './ArtistGenres.css'; + +function ArtistGenres({ genres }) { + const [firstGenre, ...otherGenres] = genres; + + if (otherGenres.length) { + return ( + + {firstGenre} + + } + tooltip={ +
+ { + otherGenres.map((tag) => { + return ( + + ); + }) + } +
+ } + kind={kinds.INVERSE} + position={tooltipPositions.TOP} + /> + ); + } + + return ( + + {firstGenre} + + ); +} + +ArtistGenres.propTypes = { + genres: PropTypes.arrayOf(PropTypes.string).isRequired +}; + +export default ArtistGenres; diff --git a/frontend/src/Components/HeartRating.css b/frontend/src/Components/HeartRating.css index 030605dbd..14a20019d 100644 --- a/frontend/src/Components/HeartRating.css +++ b/frontend/src/Components/HeartRating.css @@ -2,3 +2,7 @@ margin-right: 5px; color: var(--themeRed); } + +.rating { + margin-right: 15px; +} diff --git a/frontend/src/Components/HeartRating.js b/frontend/src/Components/HeartRating.js index c1a4f14ff..fe53a4e5f 100644 --- a/frontend/src/Components/HeartRating.js +++ b/frontend/src/Components/HeartRating.js @@ -6,7 +6,7 @@ import styles from './HeartRating.css'; function HeartRating({ rating, iconSize }) { return ( - +