mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-01-23 11:04:52 +02:00
parent
2d0541c03b
commit
226d94b050
@ -31,6 +31,7 @@ import DeleteSeriesModal from 'Series/Delete/DeleteSeriesModal';
|
|||||||
import SeriesHistoryModal from 'Series/History/SeriesHistoryModal';
|
import SeriesHistoryModal from 'Series/History/SeriesHistoryModal';
|
||||||
import SeriesAlternateTitles from './SeriesAlternateTitles';
|
import SeriesAlternateTitles from './SeriesAlternateTitles';
|
||||||
import SeriesDetailsSeasonConnector from './SeriesDetailsSeasonConnector';
|
import SeriesDetailsSeasonConnector from './SeriesDetailsSeasonConnector';
|
||||||
|
import SeriesGenres from './SeriesGenres';
|
||||||
import SeriesTagsConnector from './SeriesTagsConnector';
|
import SeriesTagsConnector from './SeriesTagsConnector';
|
||||||
import SeriesDetailsLinks from './SeriesDetailsLinks';
|
import SeriesDetailsLinks from './SeriesDetailsLinks';
|
||||||
import MonitoringOptionsModal from 'Series/MonitoringOptions/MonitoringOptionsModal';
|
import MonitoringOptionsModal from 'Series/MonitoringOptions/MonitoringOptionsModal';
|
||||||
@ -186,6 +187,7 @@ class SeriesDetails extends Component {
|
|||||||
images,
|
images,
|
||||||
seasons,
|
seasons,
|
||||||
alternateTitles,
|
alternateTitles,
|
||||||
|
genres,
|
||||||
tags,
|
tags,
|
||||||
year,
|
year,
|
||||||
previousAiring,
|
previousAiring,
|
||||||
@ -406,6 +408,8 @@ class SeriesDetails extends Component {
|
|||||||
iconSize={20}
|
iconSize={20}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<SeriesGenres genres={genres} />
|
||||||
|
|
||||||
<span>
|
<span>
|
||||||
{runningYears}
|
{runningYears}
|
||||||
</span>
|
</span>
|
||||||
@ -699,6 +703,7 @@ SeriesDetails.propTypes = {
|
|||||||
images: PropTypes.arrayOf(PropTypes.object).isRequired,
|
images: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||||
seasons: PropTypes.arrayOf(PropTypes.object).isRequired,
|
seasons: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||||
alternateTitles: PropTypes.arrayOf(PropTypes.object).isRequired,
|
alternateTitles: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||||
|
genres: PropTypes.arrayOf(PropTypes.string).isRequired,
|
||||||
tags: PropTypes.arrayOf(PropTypes.number).isRequired,
|
tags: PropTypes.arrayOf(PropTypes.number).isRequired,
|
||||||
year: PropTypes.number.isRequired,
|
year: PropTypes.number.isRequired,
|
||||||
previousAiring: PropTypes.string,
|
previousAiring: PropTypes.string,
|
||||||
|
3
frontend/src/Series/Details/SeriesGenres.css
Normal file
3
frontend/src/Series/Details/SeriesGenres.css
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
.genres {
|
||||||
|
margin-right: 15px;
|
||||||
|
}
|
53
frontend/src/Series/Details/SeriesGenres.js
Normal file
53
frontend/src/Series/Details/SeriesGenres.js
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
import PropTypes from 'prop-types';
|
||||||
|
import React from 'react';
|
||||||
|
import { kinds, sizes, tooltipPositions } from 'Helpers/Props';
|
||||||
|
import Tooltip from 'Components/Tooltip/Tooltip';
|
||||||
|
import Label from 'Components/Label';
|
||||||
|
import styles from './SeriesGenres.css';
|
||||||
|
|
||||||
|
function SeriesGenres({ genres }) {
|
||||||
|
const [firstGenre, ...otherGenres] = genres;
|
||||||
|
|
||||||
|
if (otherGenres.length) {
|
||||||
|
return (
|
||||||
|
<Tooltip
|
||||||
|
anchor={
|
||||||
|
<span className={styles.genres}>
|
||||||
|
{firstGenre}
|
||||||
|
</span>
|
||||||
|
}
|
||||||
|
tooltip={
|
||||||
|
<div>
|
||||||
|
{
|
||||||
|
otherGenres.map((tag) => {
|
||||||
|
return (
|
||||||
|
<Label
|
||||||
|
key={tag}
|
||||||
|
kind={kinds.INFO}
|
||||||
|
size={sizes.LARGE}
|
||||||
|
>
|
||||||
|
{tag}
|
||||||
|
</Label>
|
||||||
|
);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
kind={kinds.INVERSE}
|
||||||
|
position={tooltipPositions.TOP}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<span className={styles.genres}>
|
||||||
|
{firstGenre}
|
||||||
|
</span>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
SeriesGenres.propTypes = {
|
||||||
|
genres: PropTypes.arrayOf(PropTypes.string).isRequired
|
||||||
|
};
|
||||||
|
|
||||||
|
export default SeriesGenres;
|
Loading…
x
Reference in New Issue
Block a user