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