mirror of https://github.com/Sonarr/Sonarr
Fixed: Display tag list when sort by tags on series Posters
This commit is contained in:
parent
f8d75d174a
commit
1662521d40
|
@ -211,14 +211,6 @@ function SeriesIndexPoster(props: SeriesIndexPosterProps) {
|
||||||
</div>
|
</div>
|
||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
{showTags && tags.length ? (
|
|
||||||
<div className={styles.tags}>
|
|
||||||
<div className={styles.tagsList}>
|
|
||||||
<TagListConnector tags={tags} />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
) : null}
|
|
||||||
|
|
||||||
{nextAiring ? (
|
{nextAiring ? (
|
||||||
<div
|
<div
|
||||||
className={styles.nextAiring}
|
className={styles.nextAiring}
|
||||||
|
@ -238,6 +230,14 @@ function SeriesIndexPoster(props: SeriesIndexPosterProps) {
|
||||||
</div>
|
</div>
|
||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
|
{showTags && tags.length ? (
|
||||||
|
<div className={styles.tags}>
|
||||||
|
<div className={styles.tagsList}>
|
||||||
|
<TagListConnector tags={tags} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
) : null}
|
||||||
|
|
||||||
<SeriesIndexPosterInfo
|
<SeriesIndexPosterInfo
|
||||||
originalLanguage={originalLanguage}
|
originalLanguage={originalLanguage}
|
||||||
network={network}
|
network={network}
|
||||||
|
@ -253,6 +253,8 @@ function SeriesIndexPoster(props: SeriesIndexPosterProps) {
|
||||||
shortDateFormat={shortDateFormat}
|
shortDateFormat={shortDateFormat}
|
||||||
longDateFormat={longDateFormat}
|
longDateFormat={longDateFormat}
|
||||||
timeFormat={timeFormat}
|
timeFormat={timeFormat}
|
||||||
|
tags={tags}
|
||||||
|
showTags={showTags}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<EditSeriesModalConnector
|
<EditSeriesModalConnector
|
||||||
|
|
|
@ -3,3 +3,11 @@
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: $smallFontSize;
|
font-size: $smallFontSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tags {
|
||||||
|
composes: tags from '~./SeriesIndexPoster.css';
|
||||||
|
}
|
||||||
|
|
||||||
|
.tagsList {
|
||||||
|
composes: tagsList from '~./SeriesIndexPoster.css';
|
||||||
|
}
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
// Please do not change this file!
|
// Please do not change this file!
|
||||||
interface CssExports {
|
interface CssExports {
|
||||||
'info': string;
|
'info': string;
|
||||||
|
'tags': string;
|
||||||
|
'tagsList': string;
|
||||||
}
|
}
|
||||||
export const cssExports: CssExports;
|
export const cssExports: CssExports;
|
||||||
export default cssExports;
|
export default cssExports;
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import TagListConnector from 'Components/TagListConnector';
|
||||||
import Language from 'Language/Language';
|
import Language from 'Language/Language';
|
||||||
import QualityProfile from 'typings/QualityProfile';
|
import QualityProfile from 'typings/QualityProfile';
|
||||||
import formatDateTime from 'Utilities/Date/formatDateTime';
|
import formatDateTime from 'Utilities/Date/formatDateTime';
|
||||||
|
@ -17,11 +18,13 @@ interface SeriesIndexPosterInfoProps {
|
||||||
seasonCount: number;
|
seasonCount: number;
|
||||||
path: string;
|
path: string;
|
||||||
sizeOnDisk?: number;
|
sizeOnDisk?: number;
|
||||||
|
tags: number[];
|
||||||
sortKey: string;
|
sortKey: string;
|
||||||
showRelativeDates: boolean;
|
showRelativeDates: boolean;
|
||||||
shortDateFormat: string;
|
shortDateFormat: string;
|
||||||
longDateFormat: string;
|
longDateFormat: string;
|
||||||
timeFormat: string;
|
timeFormat: string;
|
||||||
|
showTags: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
function SeriesIndexPosterInfo(props: SeriesIndexPosterInfoProps) {
|
function SeriesIndexPosterInfo(props: SeriesIndexPosterInfoProps) {
|
||||||
|
@ -35,11 +38,13 @@ function SeriesIndexPosterInfo(props: SeriesIndexPosterInfoProps) {
|
||||||
seasonCount,
|
seasonCount,
|
||||||
path,
|
path,
|
||||||
sizeOnDisk,
|
sizeOnDisk,
|
||||||
|
tags,
|
||||||
sortKey,
|
sortKey,
|
||||||
showRelativeDates,
|
showRelativeDates,
|
||||||
shortDateFormat,
|
shortDateFormat,
|
||||||
longDateFormat,
|
longDateFormat,
|
||||||
timeFormat,
|
timeFormat,
|
||||||
|
showTags,
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
if (sortKey === 'network' && network) {
|
if (sortKey === 'network' && network) {
|
||||||
|
@ -122,6 +127,16 @@ function SeriesIndexPosterInfo(props: SeriesIndexPosterInfoProps) {
|
||||||
return <div className={styles.info}>{seasons}</div>;
|
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') {
|
if (sortKey === 'path') {
|
||||||
return (
|
return (
|
||||||
<div className={styles.info} title={translate('Path')}>
|
<div className={styles.info} title={translate('Path')}>
|
||||||
|
|
|
@ -183,6 +183,11 @@ export default function SeriesIndexPosters(props: SeriesIndexPostersProps) {
|
||||||
heights.push(19);
|
heights.push(19);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 'tags':
|
||||||
|
if (!showTags) {
|
||||||
|
heights.push(21);
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
// No need to add a height of 0
|
// No need to add a height of 0
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue