mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-11 20:12:41 +02:00
tidied up to only have getRelativeDate once per item
This commit is contained in:
parent
9e7ea6f55b
commit
913766f9af
@ -136,56 +136,16 @@ class MovieIndexPoster extends Component {
|
|||||||
if (showReleaseDate) {
|
if (showReleaseDate) {
|
||||||
if (physicalRelease && digitalRelease) {
|
if (physicalRelease && digitalRelease) {
|
||||||
if (physicalRelease < digitalRelease) {
|
if (physicalRelease < digitalRelease) {
|
||||||
releaseDate = getRelativeDate(
|
releaseDate = physicalRelease;
|
||||||
physicalRelease,
|
|
||||||
shortDateFormat,
|
|
||||||
showRelativeDates,
|
|
||||||
{
|
|
||||||
timeFormat,
|
|
||||||
timeForToday: false
|
|
||||||
}
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
getRelativeDate(
|
releaseDate = digitalRelease;
|
||||||
digitalRelease,
|
|
||||||
shortDateFormat,
|
|
||||||
showRelativeDates,
|
|
||||||
{
|
|
||||||
timeFormat,
|
|
||||||
timeForToday: false
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
} else if (physicalRelease && !digitalRelease) {
|
} else if (physicalRelease && !digitalRelease) {
|
||||||
releaseDate = getRelativeDate(
|
releaseDate = physicalRelease;
|
||||||
physicalRelease,
|
|
||||||
shortDateFormat,
|
|
||||||
showRelativeDates,
|
|
||||||
{
|
|
||||||
timeFormat,
|
|
||||||
timeForToday: false
|
|
||||||
}
|
|
||||||
);
|
|
||||||
} else if (digitalRelease && !physicalRelease) {
|
} else if (digitalRelease && !physicalRelease) {
|
||||||
releaseDate = getRelativeDate(
|
releaseDate = digitalRelease;
|
||||||
digitalRelease,
|
|
||||||
shortDateFormat,
|
|
||||||
showRelativeDates,
|
|
||||||
{
|
|
||||||
timeFormat,
|
|
||||||
timeForToday: false
|
|
||||||
}
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
releaseDate = getRelativeDate(
|
releaseDate = inCinemas;
|
||||||
inCinemas,
|
|
||||||
shortDateFormat,
|
|
||||||
showRelativeDates,
|
|
||||||
{
|
|
||||||
timeFormat,
|
|
||||||
timeForToday: false
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -318,7 +278,15 @@ class MovieIndexPoster extends Component {
|
|||||||
{
|
{
|
||||||
showReleaseDate &&
|
showReleaseDate &&
|
||||||
<div className={styles.title}>
|
<div className={styles.title}>
|
||||||
{releaseDate}
|
{getRelativeDate(
|
||||||
|
releaseDate,
|
||||||
|
shortDateFormat,
|
||||||
|
showRelativeDates,
|
||||||
|
{
|
||||||
|
timeFormat,
|
||||||
|
timeForToday: false
|
||||||
|
}
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -871,6 +871,7 @@
|
|||||||
"ShowQualityProfile": "Show Quality Profile",
|
"ShowQualityProfile": "Show Quality Profile",
|
||||||
"ShowQualityProfileHelpText": "Show quality profile under poster",
|
"ShowQualityProfileHelpText": "Show quality profile under poster",
|
||||||
"ShowRatings": "Show Ratings",
|
"ShowRatings": "Show Ratings",
|
||||||
|
"ShowReleaseDateHelpText": "Show release date under poster",
|
||||||
"ShowSearch": "Show Search",
|
"ShowSearch": "Show Search",
|
||||||
"ShowSearchHelpText": "Show search button on hover",
|
"ShowSearchHelpText": "Show search button on hover",
|
||||||
"ShowSizeOnDisk": "Show Size on Disk",
|
"ShowSizeOnDisk": "Show Size on Disk",
|
||||||
|
Loading…
Reference in New Issue
Block a user