mirror of
https://github.com/Radarr/Radarr
synced 2025-12-06 08:28:50 +01:00
New: Rename Protocol to Preferred Protocol in Delay Profiles
Closes #7278 (cherry picked from commit 704cf7aebef60b5b5bdf1ea55d68d4a3394396e0)
This commit is contained in:
parent
ee32d42c94
commit
7c6858ecfb
5 changed files with 23 additions and 22 deletions
|
|
@ -85,7 +85,7 @@ class DelayProfile extends Component {
|
||||||
connectDragSource
|
connectDragSource
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
let preferred = titleCase(preferredProtocol);
|
let preferred = `Prefer ${titleCase(preferredProtocol)}`;
|
||||||
|
|
||||||
if (!enableUsenet) {
|
if (!enableUsenet) {
|
||||||
preferred = translate('OnlyTorrent');
|
preferred = translate('OnlyTorrent');
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ class DelayProfiles extends Component {
|
||||||
<div>
|
<div>
|
||||||
<div className={styles.delayProfilesHeader}>
|
<div className={styles.delayProfilesHeader}>
|
||||||
<div className={styles.column}>
|
<div className={styles.column}>
|
||||||
{translate('Protocol')}
|
{translate('PreferredProtocol')}
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.column}>
|
<div className={styles.column}>
|
||||||
{translate('UsenetDelay')}
|
{translate('UsenetDelay')}
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,13 @@ import { boolSettingShape, numberSettingShape, tagSettingShape } from 'Helpers/P
|
||||||
import translate from 'Utilities/String/translate';
|
import translate from 'Utilities/String/translate';
|
||||||
import styles from './EditDelayProfileModalContent.css';
|
import styles from './EditDelayProfileModalContent.css';
|
||||||
|
|
||||||
|
const protocolOptions = [
|
||||||
|
{ key: 'preferUsenet', value: translate('PreferUsenet') },
|
||||||
|
{ key: 'preferTorrent', value: translate('PreferTorrent') },
|
||||||
|
{ key: 'onlyUsenet', value: translate('OnlyUsenet') },
|
||||||
|
{ key: 'onlyTorrent', value: translate('OnlyTorrent') }
|
||||||
|
];
|
||||||
|
|
||||||
function EditDelayProfileModalContent(props) {
|
function EditDelayProfileModalContent(props) {
|
||||||
const {
|
const {
|
||||||
id,
|
id,
|
||||||
|
|
@ -26,7 +33,6 @@ function EditDelayProfileModalContent(props) {
|
||||||
saveError,
|
saveError,
|
||||||
item,
|
item,
|
||||||
protocol,
|
protocol,
|
||||||
protocolOptions,
|
|
||||||
onInputChange,
|
onInputChange,
|
||||||
onProtocolChange,
|
onProtocolChange,
|
||||||
onSavePress,
|
onSavePress,
|
||||||
|
|
@ -52,22 +58,24 @@ function EditDelayProfileModalContent(props) {
|
||||||
|
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
{
|
{
|
||||||
isFetching &&
|
isFetching ?
|
||||||
<LoadingIndicator />
|
<LoadingIndicator /> :
|
||||||
|
null
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
!isFetching && !!error &&
|
!isFetching && !!error ?
|
||||||
<div>
|
<div>
|
||||||
{translate('UnableToAddANewQualityProfilePleaseTryAgain')}
|
{translate('UnableToAddANewQualityProfilePleaseTryAgain')}
|
||||||
</div>
|
</div> :
|
||||||
|
null
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
!isFetching && !error &&
|
!isFetching && !error ?
|
||||||
<Form {...otherProps}>
|
<Form {...otherProps}>
|
||||||
<FormGroup>
|
<FormGroup>
|
||||||
<FormLabel>{translate('Protocol')}</FormLabel>
|
<FormLabel>{translate('PreferredProtocol')}</FormLabel>
|
||||||
|
|
||||||
<FormInputGroup
|
<FormInputGroup
|
||||||
type={inputTypes.SELECT}
|
type={inputTypes.SELECT}
|
||||||
|
|
@ -143,19 +151,21 @@ function EditDelayProfileModalContent(props) {
|
||||||
/>
|
/>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
}
|
}
|
||||||
</Form>
|
</Form> :
|
||||||
|
null
|
||||||
}
|
}
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
{
|
{
|
||||||
id && id > 1 &&
|
id && id > 1 ?
|
||||||
<Button
|
<Button
|
||||||
className={styles.deleteButton}
|
className={styles.deleteButton}
|
||||||
kind={kinds.DANGER}
|
kind={kinds.DANGER}
|
||||||
onPress={onDeleteDelayProfilePress}
|
onPress={onDeleteDelayProfilePress}
|
||||||
>
|
>
|
||||||
{translate('Delete')}
|
{translate('Delete')}
|
||||||
</Button>
|
</Button> :
|
||||||
|
null
|
||||||
}
|
}
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
|
|
@ -193,7 +203,6 @@ EditDelayProfileModalContent.propTypes = {
|
||||||
saveError: PropTypes.object,
|
saveError: PropTypes.object,
|
||||||
item: PropTypes.shape(delayProfileShape).isRequired,
|
item: PropTypes.shape(delayProfileShape).isRequired,
|
||||||
protocol: PropTypes.string.isRequired,
|
protocol: PropTypes.string.isRequired,
|
||||||
protocolOptions: PropTypes.arrayOf(PropTypes.object).isRequired,
|
|
||||||
onInputChange: PropTypes.func.isRequired,
|
onInputChange: PropTypes.func.isRequired,
|
||||||
onProtocolChange: PropTypes.func.isRequired,
|
onProtocolChange: PropTypes.func.isRequired,
|
||||||
onSavePress: PropTypes.func.isRequired,
|
onSavePress: PropTypes.func.isRequired,
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ import { connect } from 'react-redux';
|
||||||
import { createSelector } from 'reselect';
|
import { createSelector } from 'reselect';
|
||||||
import { saveDelayProfile, setDelayProfileValue } from 'Store/Actions/settingsActions';
|
import { saveDelayProfile, setDelayProfileValue } from 'Store/Actions/settingsActions';
|
||||||
import selectSettings from 'Store/Selectors/selectSettings';
|
import selectSettings from 'Store/Selectors/selectSettings';
|
||||||
import translate from 'Utilities/String/translate';
|
|
||||||
import EditDelayProfileModalContent from './EditDelayProfileModalContent';
|
import EditDelayProfileModalContent from './EditDelayProfileModalContent';
|
||||||
|
|
||||||
const newDelayProfile = {
|
const newDelayProfile = {
|
||||||
|
|
@ -17,13 +16,6 @@ const newDelayProfile = {
|
||||||
tags: []
|
tags: []
|
||||||
};
|
};
|
||||||
|
|
||||||
const protocolOptions = [
|
|
||||||
{ key: 'preferUsenet', value: translate('PreferUsenet') },
|
|
||||||
{ key: 'preferTorrent', value: translate('PreferTorrent') },
|
|
||||||
{ key: 'onlyUsenet', value: translate('OnlyUsenet') },
|
|
||||||
{ key: 'onlyTorrent', value: translate('OnlyTorrent') }
|
|
||||||
];
|
|
||||||
|
|
||||||
function createDelayProfileSelector() {
|
function createDelayProfileSelector() {
|
||||||
return createSelector(
|
return createSelector(
|
||||||
(state, { id }) => id,
|
(state, { id }) => id,
|
||||||
|
|
@ -79,7 +71,6 @@ function createMapStateToProps() {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
protocol,
|
protocol,
|
||||||
protocolOptions,
|
|
||||||
...delayProfile
|
...delayProfile
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -702,6 +702,7 @@
|
||||||
"PreferIndexerFlags": "Prefer Indexer Flags",
|
"PreferIndexerFlags": "Prefer Indexer Flags",
|
||||||
"PreferIndexerFlagsHelpText": "Prioritize releases with special flags",
|
"PreferIndexerFlagsHelpText": "Prioritize releases with special flags",
|
||||||
"Preferred": "Preferred",
|
"Preferred": "Preferred",
|
||||||
|
"PreferredProtocol": "Preferred Protocol",
|
||||||
"PreferredSize": "Preferred Size",
|
"PreferredSize": "Preferred Size",
|
||||||
"PreferTorrent": "Prefer Torrent",
|
"PreferTorrent": "Prefer Torrent",
|
||||||
"PreferUsenet": "Prefer Usenet",
|
"PreferUsenet": "Prefer Usenet",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue