mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-11 20:12:41 +02:00
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 = '';
|
||||
} else if (physicalRelease && !digitalRelease) {
|
||||
releaseDate = physicalRelease;
|
||||
} else if (digitalRelease && !physicalRelease) {
|
||||
releaseDate = digitalRelease;
|
||||
if (physicalRelease < digitalRelease) {
|
||||
releaseDate = getRelativeDate(
|
||||
physicalRelease,
|
||||
shortDateFormat,
|
||||
showRelativeDates,
|
||||
{
|
||||
timeFormat,
|
||||
timeForToday: false
|
||||
}
|
||||
);
|
||||
} 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 &&
|
||||
<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
Block a user