Fixed: Added missing sort token details for poster views

Fixes #1424
This commit is contained in:
ta264
2021-12-23 21:41:43 +00:00
parent 472da10149
commit 76bcf94f1d
3 changed files with 67 additions and 34 deletions
@@ -8,8 +8,10 @@ function AuthorIndexPosterInfo(props) {
const {
qualityProfile,
showQualityProfile,
previousAiring,
metadataProfile,
added,
nextBook,
lastBook,
bookCount,
path,
sizeOnDisk,
@@ -27,20 +29,10 @@ function AuthorIndexPosterInfo(props) {
);
}
if (sortKey === 'previousAiring' && previousAiring) {
if (sortKey === 'metadataProfileId') {
return (
<div className={styles.info}>
{
getRelativeDate(
previousAiring,
shortDateFormat,
showRelativeDates,
{
timeFormat,
timeForToday: true
}
)
}
{metadataProfile.name}
</div>
);
}
@@ -63,6 +55,42 @@ function AuthorIndexPosterInfo(props) {
);
}
if (sortKey === 'nextBook' && nextBook) {
const date = getRelativeDate(
nextBook.releaseDate,
shortDateFormat,
showRelativeDates,
{
timeFormat,
timeForToday: false
}
);
return (
<div className={styles.info}>
{`Next Book ${date}`}
</div>
);
}
if (sortKey === 'lastBook' && lastBook) {
const date = getRelativeDate(
lastBook.releaseDate,
shortDateFormat,
showRelativeDates,
{
timeFormat,
timeForToday: false
}
);
return (
<div className={styles.info}>
{`Last Book ${date}`}
</div>
);
}
if (sortKey === 'bookCount') {
let books = '1 book';
@@ -101,8 +129,10 @@ function AuthorIndexPosterInfo(props) {
AuthorIndexPosterInfo.propTypes = {
qualityProfile: PropTypes.object.isRequired,
showQualityProfile: PropTypes.bool.isRequired,
previousAiring: PropTypes.string,
metadataProfile: PropTypes.object.isRequired,
added: PropTypes.string,
nextBook: PropTypes.object,
lastBook: PropTypes.object,
bookCount: PropTypes.number.isRequired,
path: PropTypes.string.isRequired,
sizeOnDisk: PropTypes.number,