1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-23 22:25:56 -04:00

New: Default name when adding providers

This commit is contained in:
Bogdan
2023-08-14 02:27:59 +03:00
committed by GitHub
parent 465a584486
commit 16d95ea6bf
19 changed files with 59 additions and 26 deletions
@@ -16,10 +16,12 @@ class AddImportListItem extends Component {
onImportListSelect = () => {
const {
implementation
implementation,
implementationName,
minRefreshInterval
} = this.props;
this.props.onImportListSelect({ implementation });
this.props.onImportListSelect({ implementation, implementationName, minRefreshInterval });
};
//
@@ -29,6 +31,7 @@ class AddImportListItem extends Component {
const {
implementation,
implementationName,
minRefreshInterval,
infoLink,
presets,
onImportListSelect
@@ -56,7 +59,7 @@ class AddImportListItem extends Component {
<span>
<Button
size={sizes.SMALL}
onPress={this.onListSelect}
onPress={this.onImportListSelect}
>
{translate('Custom')}
</Button>
@@ -77,6 +80,8 @@ class AddImportListItem extends Component {
key={preset.name}
name={preset.name}
implementation={implementation}
implementationName={implementationName}
minRefreshInterval={minRefreshInterval}
onPress={onImportListSelect}
/>
);
@@ -103,6 +108,7 @@ class AddImportListItem extends Component {
AddImportListItem.propTypes = {
implementation: PropTypes.string.isRequired,
implementationName: PropTypes.string.isRequired,
minRefreshInterval: PropTypes.string.isRequired,
infoLink: PropTypes.string.isRequired,
presets: PropTypes.arrayOf(PropTypes.object),
onImportListSelect: PropTypes.func.isRequired
@@ -49,8 +49,8 @@ class AddImportListModalContentConnector extends Component {
//
// Listeners
onImportListSelect = ({ implementation, name }) => {
this.props.selectImportListSchema({ implementation, presetName: name });
onImportListSelect = ({ implementation, implementationName, name, minRefreshInterval }) => {
this.props.selectImportListSchema({ implementation, implementationName, presetName: name, minRefreshInterval });
this.props.onModalClose({ listSelected: true });
};
@@ -10,12 +10,16 @@ class AddImportListPresetMenuItem extends Component {
onPress = () => {
const {
name,
implementation
implementation,
implementationName,
minRefreshInterval
} = this.props;
this.props.onPress({
name,
implementation
implementation,
implementationName,
minRefreshInterval
});
};
@@ -26,6 +30,8 @@ class AddImportListPresetMenuItem extends Component {
const {
name,
implementation,
implementationName,
minRefreshInterval,
...otherProps
} = this.props;
@@ -43,6 +49,8 @@ class AddImportListPresetMenuItem extends Component {
AddImportListPresetMenuItem.propTypes = {
name: PropTypes.string.isRequired,
implementation: PropTypes.string.isRequired,
implementationName: PropTypes.string.isRequired,
minRefreshInterval: PropTypes.string.isRequired,
onPress: PropTypes.func.isRequired
};
@@ -43,6 +43,7 @@ function EditImportListModalContent(props) {
const {
id,
implementationName,
name,
enableAutomaticAdd,
minRefreshInterval,
@@ -58,7 +59,7 @@ function EditImportListModalContent(props) {
return (
<ModalContent onModalClose={onModalClose}>
<ModalHeader>
{id ? translate('EditImportList') : translate('AddImportList')}
{id ? translate('EditImportListImplementation', { implementationName }) : translate('AddImportListImplementation', { implementationName })}
</ModalHeader>
<ModalBody>