mirror of https://github.com/Radarr/Radarr
formatted date
This commit is contained in:
parent
1a755bd3c0
commit
c2c4186965
|
@ -134,13 +134,57 @@ class MovieIndexPoster extends Component {
|
||||||
let releaseDate = '';
|
let releaseDate = '';
|
||||||
if (showReleaseDate) {
|
if (showReleaseDate) {
|
||||||
if (physicalRelease && digitalRelease) {
|
if (physicalRelease && digitalRelease) {
|
||||||
releaseDate = '';
|
if (physicalRelease < digitalRelease) {
|
||||||
} else if (physicalRelease && !digitalRelease) {
|
releaseDate = getRelativeDate(
|
||||||
releaseDate = physicalRelease;
|
physicalRelease,
|
||||||
} else if (digitalRelease && !physicalRelease) {
|
shortDateFormat,
|
||||||
releaseDate = digitalRelease;
|
showRelativeDates,
|
||||||
|
{
|
||||||
|
timeFormat,
|
||||||
|
timeForToday: false
|
||||||
|
}
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
releaseDate = inCinemas;
|
getRelativeDate(
|
||||||
|
digitalRelease,
|
||||||
|
shortDateFormat,
|
||||||
|
showRelativeDates,
|
||||||
|
{
|
||||||
|
timeFormat,
|
||||||
|
timeForToday: false
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} else if (physicalRelease && !digitalRelease) {
|
||||||
|
releaseDate = getRelativeDate(
|
||||||
|
physicalRelease,
|
||||||
|
shortDateFormat,
|
||||||
|
showRelativeDates,
|
||||||
|
{
|
||||||
|
timeFormat,
|
||||||
|
timeForToday: false
|
||||||
|
}
|
||||||
|
);
|
||||||
|
} else if (digitalRelease && !physicalRelease) {
|
||||||
|
releaseDate = getRelativeDate(
|
||||||
|
digitalRelease,
|
||||||
|
shortDateFormat,
|
||||||
|
showRelativeDates,
|
||||||
|
{
|
||||||
|
timeFormat,
|
||||||
|
timeForToday: false
|
||||||
|
}
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
releaseDate = getRelativeDate(
|
||||||
|
inCinemas,
|
||||||
|
shortDateFormat,
|
||||||
|
showRelativeDates,
|
||||||
|
{
|
||||||
|
timeFormat,
|
||||||
|
timeForToday: false
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -272,9 +316,12 @@ class MovieIndexPoster extends Component {
|
||||||
|
|
||||||
{
|
{
|
||||||
showReleaseDate &&
|
showReleaseDate &&
|
||||||
<div className={styles.title}>
|
<RelativeDateCellConnector
|
||||||
{releaseDate}
|
key={releaseDate}
|
||||||
</div>
|
className={styles.title}
|
||||||
|
date={releaseDate}
|
||||||
|
component={VirtualTableRowCell}
|
||||||
|
/>
|
||||||
}
|
}
|
||||||
|
|
||||||
<MovieIndexPosterInfo
|
<MovieIndexPosterInfo
|
||||||
|
|
|
@ -38,7 +38,8 @@ function calculateRowHeight(posterHeight, sortKey, isSmallScreen, posterOptions)
|
||||||
detailedProgressBar,
|
detailedProgressBar,
|
||||||
showTitle,
|
showTitle,
|
||||||
showMonitored,
|
showMonitored,
|
||||||
showQualityProfile
|
showQualityProfile,
|
||||||
|
showReleaseDate
|
||||||
} = posterOptions;
|
} = posterOptions;
|
||||||
|
|
||||||
const nextAiringHeight = 19;
|
const nextAiringHeight = 19;
|
||||||
|
@ -62,6 +63,10 @@ function calculateRowHeight(posterHeight, sortKey, isSmallScreen, posterOptions)
|
||||||
heights.push(19);
|
heights.push(19);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (showReleaseDate) {
|
||||||
|
heights.push(19);
|
||||||
|
}
|
||||||
|
|
||||||
switch (sortKey) {
|
switch (sortKey) {
|
||||||
case 'studio':
|
case 'studio':
|
||||||
case 'added':
|
case 'added':
|
||||||
|
@ -206,7 +211,8 @@ class MovieIndexPosters extends Component {
|
||||||
detailedProgressBar,
|
detailedProgressBar,
|
||||||
showTitle,
|
showTitle,
|
||||||
showMonitored,
|
showMonitored,
|
||||||
showQualityProfile
|
showQualityProfile,
|
||||||
|
showReleaseDate
|
||||||
} = posterOptions;
|
} = posterOptions;
|
||||||
|
|
||||||
const movieIdx = rowIndex * columnCount + columnIndex;
|
const movieIdx = rowIndex * columnCount + columnIndex;
|
||||||
|
@ -235,6 +241,7 @@ class MovieIndexPosters extends Component {
|
||||||
showTitle={showTitle}
|
showTitle={showTitle}
|
||||||
showMonitored={showMonitored}
|
showMonitored={showMonitored}
|
||||||
showQualityProfile={showQualityProfile}
|
showQualityProfile={showQualityProfile}
|
||||||
|
showReleaseDate={showReleaseDate}
|
||||||
showRelativeDates={showRelativeDates}
|
showRelativeDates={showRelativeDates}
|
||||||
shortDateFormat={shortDateFormat}
|
shortDateFormat={shortDateFormat}
|
||||||
timeFormat={timeFormat}
|
timeFormat={timeFormat}
|
||||||
|
|
Loading…
Reference in New Issue