mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-11 20:12:41 +02:00
added option and start of info
This commit is contained in:
parent
e5f66da087
commit
1a755bd3c0
@ -101,6 +101,10 @@ class MovieIndexPoster extends Component {
|
||||
showSearchAction,
|
||||
showRelativeDates,
|
||||
shortDateFormat,
|
||||
showReleaseDate,
|
||||
inCinemas,
|
||||
physicalRelease,
|
||||
digitalRelease,
|
||||
timeFormat,
|
||||
isRefreshingMovie,
|
||||
isSearchingMovie,
|
||||
@ -127,6 +131,19 @@ class MovieIndexPoster extends Component {
|
||||
height: `${posterHeight}px`
|
||||
};
|
||||
|
||||
let releaseDate = '';
|
||||
if (showReleaseDate) {
|
||||
if (physicalRelease && digitalRelease) {
|
||||
releaseDate = '';
|
||||
} else if (physicalRelease && !digitalRelease) {
|
||||
releaseDate = physicalRelease;
|
||||
} else if (digitalRelease && !physicalRelease) {
|
||||
releaseDate = digitalRelease;
|
||||
} else {
|
||||
releaseDate = inCinemas;
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={styles.content}>
|
||||
<div className={styles.posterContainer}>
|
||||
@ -253,9 +270,17 @@ class MovieIndexPoster extends Component {
|
||||
</div>
|
||||
}
|
||||
|
||||
{
|
||||
showReleaseDate &&
|
||||
<div className={styles.title}>
|
||||
{releaseDate}
|
||||
</div>
|
||||
}
|
||||
|
||||
<MovieIndexPosterInfo
|
||||
qualityProfile={qualityProfile}
|
||||
showQualityProfile={showQualityProfile}
|
||||
showReleaseDate={showReleaseDate}
|
||||
showRelativeDates={showRelativeDates}
|
||||
shortDateFormat={shortDateFormat}
|
||||
timeFormat={timeFormat}
|
||||
@ -298,6 +323,10 @@ MovieIndexPoster.propTypes = {
|
||||
showSearchAction: PropTypes.bool.isRequired,
|
||||
showRelativeDates: PropTypes.bool.isRequired,
|
||||
shortDateFormat: PropTypes.string.isRequired,
|
||||
showReleaseDate: PropTypes.bool.isRequired,
|
||||
inCinemas: PropTypes.string,
|
||||
physicalRelease: PropTypes.string,
|
||||
digitalRelease: PropTypes.string,
|
||||
timeFormat: PropTypes.string.isRequired,
|
||||
isRefreshingMovie: PropTypes.bool.isRequired,
|
||||
isSearchingMovie: PropTypes.bool.isRequired,
|
||||
|
@ -33,6 +33,7 @@ class MovieIndexPosterOptionsModalContent extends Component {
|
||||
showTitle: props.showTitle,
|
||||
showMonitored: props.showMonitored,
|
||||
showQualityProfile: props.showQualityProfile,
|
||||
showReleaseDate: props.showReleaseDate,
|
||||
showSearchAction: props.showSearchAction
|
||||
};
|
||||
}
|
||||
@ -44,6 +45,7 @@ class MovieIndexPosterOptionsModalContent extends Component {
|
||||
showTitle,
|
||||
showMonitored,
|
||||
showQualityProfile,
|
||||
showReleaseDate,
|
||||
showSearchAction
|
||||
} = this.props;
|
||||
|
||||
@ -69,6 +71,10 @@ class MovieIndexPosterOptionsModalContent extends Component {
|
||||
state.showQualityProfile = showQualityProfile;
|
||||
}
|
||||
|
||||
if (showReleaseDate !== prevProps.showReleaseDate) {
|
||||
state.showReleaseDate = showReleaseDate;
|
||||
}
|
||||
|
||||
if (showSearchAction !== prevProps.showSearchAction) {
|
||||
state.showSearchAction = showSearchAction;
|
||||
}
|
||||
@ -103,6 +109,7 @@ class MovieIndexPosterOptionsModalContent extends Component {
|
||||
showTitle,
|
||||
showMonitored,
|
||||
showQualityProfile,
|
||||
showReleaseDate,
|
||||
showSearchAction
|
||||
} = this.state;
|
||||
|
||||
@ -174,6 +181,18 @@ class MovieIndexPosterOptionsModalContent extends Component {
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup>
|
||||
<FormLabel>{translate('ShowReleaseDate')}</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.CHECK}
|
||||
name="showReleaseDate"
|
||||
value={showReleaseDate}
|
||||
helpText={translate('ShowReleaseDateHelpText')}
|
||||
onChange={this.onChangePosterOption}
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup>
|
||||
<FormLabel>{translate('ShowSearch')}</FormLabel>
|
||||
|
||||
@ -206,6 +225,7 @@ MovieIndexPosterOptionsModalContent.propTypes = {
|
||||
showMonitored: PropTypes.bool.isRequired,
|
||||
showQualityProfile: PropTypes.bool.isRequired,
|
||||
detailedProgressBar: PropTypes.bool.isRequired,
|
||||
showReleaseDate: PropTypes.bool.isRequired,
|
||||
showSearchAction: PropTypes.bool.isRequired,
|
||||
onChangePosterOption: PropTypes.func.isRequired,
|
||||
onModalClose: PropTypes.func.isRequired
|
||||
|
Loading…
Reference in New Issue
Block a user