New: Default name when adding providers

pull/1832/head
Bogdan 10 months ago
parent 27928103c5
commit a758161e31

@ -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;

@ -4,11 +4,18 @@
"Actions": "Actions",
"Add": "Add",
"AddApplication": "Add Application",
"AddApplicationImplementation": "Add Application - {implementationName}",
"AddCategory": "Add Category",
"AddConnection": "Add Connection",
"AddConnectionImplementation": "Add Connection - {implementationName}",
"AddCustomFilter": "Add Custom Filter",
"AddDownloadClient": "Add Download Client",
"AddDownloadClientImplementation": "Add Download Client - {implementationName}",
"AddDownloadClientToProwlarr": "Adding a download client allows Prowlarr to send releases direct from the UI while doing a manual search.",
"AddIndexer": "Add Indexer",
"AddIndexerImplementation": "Add Indexer - {implementationName}",
"AddIndexerProxy": "Add Indexer Proxy",
"AddIndexerProxyImplementation": "Add Indexer Proxy - {implementationName}",
"AddNewIndexer": "Add New Indexer",
"AddRemoveOnly": "Add and Remove Only",
"AddSyncProfile": "Add Sync Profile",
@ -160,7 +167,13 @@
"DownloadClientsSettingsSummary": "Download clients configuration for integration into Prowlarr UI search",
"Duration": "Duration",
"Edit": "Edit",
"EditApplicationImplementation": "Edit Application - {implementationName}",
"EditCategory": "Edit Category",
"EditConnectionImplementation": "Edit Connection - {implementationName}",
"EditDownloadClientImplementation": "Edit Download Client - {implementationName}",
"EditIndexer": "Edit Indexer",
"EditIndexerImplementation": "Edit Indexer - {implementationName}",
"EditIndexerProxyImplementation": "Edit Indexer Proxy - {implementationName}",
"EditSelectedDownloadClients": "Edit Selected Download Clients",
"EditSelectedIndexers": "Edit Selected Indexers",
"EditSyncProfile": "Edit Sync Profile",

Loading…
Cancel
Save