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