New: Added Running Years into the shows details
This commit is contained in:
parent
c30ce3580a
commit
98e5442f24
|
@ -2,3 +2,7 @@
|
|||
margin-right: 5px;
|
||||
color: $themeRed;
|
||||
}
|
||||
|
||||
.rating {
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ import styles from './HeartRating.css';
|
|||
|
||||
function HeartRating({ rating, iconSize }) {
|
||||
return (
|
||||
<span>
|
||||
<span className={styles.rating}>
|
||||
<Icon
|
||||
className={styles.heart}
|
||||
name={icons.HEART}
|
||||
|
|
|
@ -57,6 +57,11 @@ function getExpandedState(newState) {
|
|||
};
|
||||
}
|
||||
|
||||
function getDateYear(date) {
|
||||
const dateDate = new Date(date);
|
||||
return dateDate.getFullYear();
|
||||
}
|
||||
|
||||
class SeriesDetails extends Component {
|
||||
|
||||
//
|
||||
|
@ -192,6 +197,8 @@ class SeriesDetails extends Component {
|
|||
seasons,
|
||||
alternateTitles,
|
||||
tags,
|
||||
year,
|
||||
previousAiring,
|
||||
isSaving,
|
||||
isRefreshing,
|
||||
isSearching,
|
||||
|
@ -229,6 +236,7 @@ class SeriesDetails extends Component {
|
|||
} = this.state;
|
||||
|
||||
const statusDetails = getSeriesStatusDetails(status);
|
||||
const runningYears = statusDetails.title === 'Ended' ? `${year}-${getDateYear(previousAiring)}` : `${year}-`;
|
||||
|
||||
let episodeFilesCountMessage = 'No episode files';
|
||||
|
||||
|
@ -414,6 +422,10 @@ class SeriesDetails extends Component {
|
|||
rating={ratings.value}
|
||||
iconSize={20}
|
||||
/>
|
||||
|
||||
<span>
|
||||
{runningYears}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -706,6 +718,8 @@ SeriesDetails.propTypes = {
|
|||
seasons: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
alternateTitles: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
tags: PropTypes.arrayOf(PropTypes.number).isRequired,
|
||||
year: PropTypes.number.isRequired,
|
||||
previousAiring: PropTypes.string,
|
||||
isSaving: PropTypes.bool.isRequired,
|
||||
saveError: PropTypes.object,
|
||||
isRefreshing: PropTypes.bool.isRequired,
|
||||
|
|
Loading…
Reference in New Issue