New: Show definition name on add/edit screen for Cardigann

This commit is contained in:
Qstick
2022-01-17 19:23:08 -06:00
parent 34e57f27ff
commit 1cbf61f4db
3 changed files with 14 additions and 1 deletions

View File

@@ -39,6 +39,7 @@ function EditIndexerModalContent(props) {
const {
id,
implementationName,
definitionName,
name,
enable,
redirect,
@@ -50,10 +51,12 @@ function EditIndexerModalContent(props) {
priority
} = item;
const indexerDisplayName = implementationName === definitionName ? implementationName : `${implementationName} (${definitionName})`;
return (
<ModalContent onModalClose={onModalClose}>
<ModalHeader>
{`${id ? translate('EditIndexer') : translate('AddIndexer')} - ${implementationName}`}
{`${id ? translate('EditIndexer') : translate('AddIndexer')} - ${indexerDisplayName}`}
</ModalHeader>
<ModalBody>

View File

@@ -36,6 +36,12 @@ function selectSettings(item, pendingChanges, saveError) {
return result;
}
if (key === 'definitionName') {
result.definitionName = item[key];
return result;
}
const setting = {
value: item[key],
errors: _.map(_.remove(validationFailures, (failure) => {