Fixed: Display tag list when sort by tags on series Posters

This commit is contained in:
Bogdan 2024-07-17 17:41:40 +03:00 committed by Mark McDowall
parent f8d75d174a
commit 1662521d40
5 changed files with 40 additions and 8 deletions

View File

@ -211,14 +211,6 @@ function SeriesIndexPoster(props: SeriesIndexPosterProps) {
</div>
) : null}
{showTags && tags.length ? (
<div className={styles.tags}>
<div className={styles.tagsList}>
<TagListConnector tags={tags} />
</div>
</div>
) : null}
{nextAiring ? (
<div
className={styles.nextAiring}
@ -238,6 +230,14 @@ function SeriesIndexPoster(props: SeriesIndexPosterProps) {
</div>
) : null}
{showTags && tags.length ? (
<div className={styles.tags}>
<div className={styles.tagsList}>
<TagListConnector tags={tags} />
</div>
</div>
) : null}
<SeriesIndexPosterInfo
originalLanguage={originalLanguage}
network={network}
@ -253,6 +253,8 @@ function SeriesIndexPoster(props: SeriesIndexPosterProps) {
shortDateFormat={shortDateFormat}
longDateFormat={longDateFormat}
timeFormat={timeFormat}
tags={tags}
showTags={showTags}
/>
<EditSeriesModalConnector

View File

@ -3,3 +3,11 @@
text-align: center;
font-size: $smallFontSize;
}
.tags {
composes: tags from '~./SeriesIndexPoster.css';
}
.tagsList {
composes: tagsList from '~./SeriesIndexPoster.css';
}

View File

@ -2,6 +2,8 @@
// Please do not change this file!
interface CssExports {
'info': string;
'tags': string;
'tagsList': string;
}
export const cssExports: CssExports;
export default cssExports;

View File

@ -1,4 +1,5 @@
import React from 'react';
import TagListConnector from 'Components/TagListConnector';
import Language from 'Language/Language';
import QualityProfile from 'typings/QualityProfile';
import formatDateTime from 'Utilities/Date/formatDateTime';
@ -17,11 +18,13 @@ interface SeriesIndexPosterInfoProps {
seasonCount: number;
path: string;
sizeOnDisk?: number;
tags: number[];
sortKey: string;
showRelativeDates: boolean;
shortDateFormat: string;
longDateFormat: string;
timeFormat: string;
showTags: boolean;
}
function SeriesIndexPosterInfo(props: SeriesIndexPosterInfoProps) {
@ -35,11 +38,13 @@ function SeriesIndexPosterInfo(props: SeriesIndexPosterInfoProps) {
seasonCount,
path,
sizeOnDisk,
tags,
sortKey,
showRelativeDates,
shortDateFormat,
longDateFormat,
timeFormat,
showTags,
} = props;
if (sortKey === 'network' && network) {
@ -122,6 +127,16 @@ function SeriesIndexPosterInfo(props: SeriesIndexPosterInfoProps) {
return <div className={styles.info}>{seasons}</div>;
}
if (!showTags && sortKey === 'tags' && tags.length) {
return (
<div className={styles.tags}>
<div className={styles.tagsList}>
<TagListConnector tags={tags} />
</div>
</div>
);
}
if (sortKey === 'path') {
return (
<div className={styles.info} title={translate('Path')}>

View File

@ -183,6 +183,11 @@ export default function SeriesIndexPosters(props: SeriesIndexPostersProps) {
heights.push(19);
}
break;
case 'tags':
if (!showTags) {
heights.push(21);
}
break;
default:
// No need to add a height of 0
}