mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
New: Default name when adding providers
This commit is contained in:
@@ -263,6 +263,7 @@ class AddIndexerModalContent extends Component {
|
||||
<SelectIndexerRowConnector
|
||||
key={`${indexer.implementation}-${indexer.name}`}
|
||||
implementation={indexer.implementation}
|
||||
implementationName={indexer.implementationName}
|
||||
{...indexer}
|
||||
onIndexerSelect={onIndexerSelect}
|
||||
/>
|
||||
|
@@ -49,8 +49,8 @@ class AddIndexerModalContentConnector extends Component {
|
||||
//
|
||||
// Listeners
|
||||
|
||||
onIndexerSelect = ({ implementation, name }) => {
|
||||
this.props.selectIndexerSchema({ implementation, name });
|
||||
onIndexerSelect = ({ implementation, implementationName, name }) => {
|
||||
this.props.selectIndexerSchema({ implementation, implementationName, name });
|
||||
this.props.onSelectIndexer();
|
||||
};
|
||||
|
||||
|
@@ -10,12 +10,14 @@ class AddIndexerPresetMenuItem extends Component {
|
||||
onPress = () => {
|
||||
const {
|
||||
name,
|
||||
implementation
|
||||
implementation,
|
||||
implementationName
|
||||
} = this.props;
|
||||
|
||||
this.props.onPress({
|
||||
name,
|
||||
implementation
|
||||
implementation,
|
||||
implementationName
|
||||
});
|
||||
};
|
||||
|
||||
@@ -26,6 +28,7 @@ class AddIndexerPresetMenuItem extends Component {
|
||||
const {
|
||||
name,
|
||||
implementation,
|
||||
implementationName,
|
||||
...otherProps
|
||||
} = this.props;
|
||||
|
||||
@@ -43,6 +46,7 @@ class AddIndexerPresetMenuItem extends Component {
|
||||
AddIndexerPresetMenuItem.propTypes = {
|
||||
name: PropTypes.string.isRequired,
|
||||
implementation: PropTypes.string.isRequired,
|
||||
implementationName: PropTypes.string.isRequired,
|
||||
onPress: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
|
@@ -17,10 +17,11 @@ class SelectIndexerRow extends Component {
|
||||
onPress = () => {
|
||||
const {
|
||||
implementation,
|
||||
implementationName,
|
||||
name
|
||||
} = this.props;
|
||||
|
||||
this.props.onIndexerSelect({ implementation, name });
|
||||
this.props.onIndexerSelect({ implementation, implementationName, name });
|
||||
};
|
||||
|
||||
//
|
||||
@@ -81,6 +82,7 @@ SelectIndexerRow.propTypes = {
|
||||
language: PropTypes.string.isRequired,
|
||||
description: PropTypes.string.isRequired,
|
||||
implementation: PropTypes.string.isRequired,
|
||||
implementationName: PropTypes.string.isRequired,
|
||||
onIndexerSelect: PropTypes.func.isRequired,
|
||||
isExistingIndexer: PropTypes.bool.isRequired
|
||||
};
|
||||
|
@@ -61,7 +61,7 @@ function EditIndexerModalContent(props) {
|
||||
return (
|
||||
<ModalContent onModalClose={onModalClose}>
|
||||
<ModalHeader>
|
||||
{`${id ? translate('EditIndexer') : translate('AddIndexer')} - ${indexerDisplayName}`}
|
||||
{id ? translate('EditIndexerImplementation', { implementationName: indexerDisplayName }) : translate('AddIndexerImplementation', { implementationName: indexerDisplayName })}
|
||||
</ModalHeader>
|
||||
|
||||
<ModalBody>
|
||||
|
@@ -16,10 +16,11 @@ class AddApplicationItem extends Component {
|
||||
|
||||
onApplicationSelect = () => {
|
||||
const {
|
||||
implementation
|
||||
implementation,
|
||||
implementationName
|
||||
} = this.props;
|
||||
|
||||
this.props.onApplicationSelect({ implementation });
|
||||
this.props.onApplicationSelect({ implementation, implementationName });
|
||||
};
|
||||
|
||||
//
|
||||
@@ -77,6 +78,7 @@ class AddApplicationItem extends Component {
|
||||
key={preset.name}
|
||||
name={preset.name}
|
||||
implementation={implementation}
|
||||
implementationName={implementationName}
|
||||
onPress={onApplicationSelect}
|
||||
/>
|
||||
);
|
||||
|
@@ -10,12 +10,14 @@ class AddApplicationPresetMenuItem extends Component {
|
||||
onPress = () => {
|
||||
const {
|
||||
name,
|
||||
implementation
|
||||
implementation,
|
||||
implementationName
|
||||
} = this.props;
|
||||
|
||||
this.props.onPress({
|
||||
name,
|
||||
implementation
|
||||
implementation,
|
||||
implementationName
|
||||
});
|
||||
};
|
||||
|
||||
@@ -26,6 +28,7 @@ class AddApplicationPresetMenuItem extends Component {
|
||||
const {
|
||||
name,
|
||||
implementation,
|
||||
implementationName,
|
||||
...otherProps
|
||||
} = this.props;
|
||||
|
||||
@@ -43,6 +46,7 @@ class AddApplicationPresetMenuItem extends Component {
|
||||
AddApplicationPresetMenuItem.propTypes = {
|
||||
name: PropTypes.string.isRequired,
|
||||
implementation: PropTypes.string.isRequired,
|
||||
implementationName: PropTypes.string.isRequired,
|
||||
onPress: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
|
@@ -71,7 +71,7 @@ function EditApplicationModalContent(props) {
|
||||
return (
|
||||
<ModalContent onModalClose={onModalClose}>
|
||||
<ModalHeader>
|
||||
{`${id ? translate('Edit') : translate('Add')} ${translate('Application')} - ${implementationName}`}
|
||||
{id ? translate('EditApplicationImplementation', { implementationName }) : translate('AddApplicationImplementation', { implementationName })}
|
||||
</ModalHeader>
|
||||
|
||||
<ModalBody>
|
||||
|
@@ -35,7 +35,7 @@ function AddCategoryModalContent(props) {
|
||||
return (
|
||||
<ModalContent onModalClose={onCancelPress}>
|
||||
<ModalHeader>
|
||||
{`${id ? 'Edit' : 'Add'} Category`}
|
||||
{id ? translate('EditCategory') : translate('AddCategory')}
|
||||
</ModalHeader>
|
||||
|
||||
<ModalBody>
|
||||
|
@@ -84,7 +84,7 @@ class EditDownloadClientModalContent extends Component {
|
||||
return (
|
||||
<ModalContent onModalClose={onModalClose}>
|
||||
<ModalHeader>
|
||||
{`${id ? translate('Edit') : translate('Add')} ${translate('DownloadClient')} - ${implementationName}`}
|
||||
{id ? translate('EditDownloadClientImplementation', { implementationName }) : translate('AddDownloadClientImplementation', { implementationName })}
|
||||
</ModalHeader>
|
||||
|
||||
<ModalBody>
|
||||
|
@@ -16,10 +16,11 @@ class AddIndexerProxyItem extends Component {
|
||||
|
||||
onIndexerProxySelect = () => {
|
||||
const {
|
||||
implementation
|
||||
implementation,
|
||||
implementationName
|
||||
} = this.props;
|
||||
|
||||
this.props.onIndexerProxySelect({ implementation });
|
||||
this.props.onIndexerProxySelect({ implementation, implementationName });
|
||||
};
|
||||
|
||||
//
|
||||
@@ -77,6 +78,7 @@ class AddIndexerProxyItem extends Component {
|
||||
key={preset.name}
|
||||
name={preset.name}
|
||||
implementation={implementation}
|
||||
implementationName={implementationName}
|
||||
onPress={onIndexerProxySelect}
|
||||
/>
|
||||
);
|
||||
|
@@ -47,7 +47,7 @@ function EditIndexerProxyModalContent(props) {
|
||||
return (
|
||||
<ModalContent onModalClose={onModalClose}>
|
||||
<ModalHeader>
|
||||
{`${id ? 'Edit' : 'Add'} Proxy - ${implementationName}`}
|
||||
{id ? translate('EditIndexerProxyImplementation', { implementationName }) : translate('AddIndexerProxyImplementation', { implementationName })}
|
||||
</ModalHeader>
|
||||
|
||||
<ModalBody>
|
||||
|
@@ -28,7 +28,7 @@ class AddNotificationModalContent extends Component {
|
||||
return (
|
||||
<ModalContent onModalClose={onModalClose}>
|
||||
<ModalHeader>
|
||||
Add Notification
|
||||
{translate('AddConnection')}
|
||||
</ModalHeader>
|
||||
|
||||
<ModalBody>
|
||||
|
@@ -48,7 +48,7 @@ function EditNotificationModalContent(props) {
|
||||
return (
|
||||
<ModalContent onModalClose={onModalClose}>
|
||||
<ModalHeader>
|
||||
{`${id ? 'Edit' : 'Add'} Connection - ${implementationName}`}
|
||||
{id ? translate('EditConnectionImplementation', { implementationName }) : translate('AddConnectionImplementation', { implementationName })}
|
||||
</ModalHeader>
|
||||
|
||||
<ModalBody>
|
||||
|
@@ -184,6 +184,8 @@ export const reducers = createHandleActions({
|
||||
|
||||
[SELECT_INDEXER_SCHEMA]: (state, { payload }) => {
|
||||
return selectSchema(state, payload, (selectedSchema) => {
|
||||
selectedSchema.name = payload.name ?? payload.implementationName;
|
||||
selectedSchema.implementationName = payload.implementationName;
|
||||
selectedSchema.enable = selectedSchema.supportsRss;
|
||||
|
||||
return selectedSchema;
|
||||
|
Reference in New Issue
Block a user