New: Allow Import to update existing Custom Formats

Fixes #6178
This commit is contained in:
Qstick 2021-12-21 19:18:36 -06:00
parent 2838d8ca29
commit eecd4e4b7d
2 changed files with 23 additions and 19 deletions

View File

@ -4,6 +4,11 @@
margin-right: auto;
}
.rightButtons {
justify-content: flex-end;
margin-right: auto;
}
.addSpecification {
composes: customFormat from '~./CustomFormat.css';

View File

@ -198,26 +198,25 @@ class EditCustomFormatModalContent extends Component {
</div>
</ModalBody>
<ModalFooter>
{
id &&
<Button
className={styles.deleteButton}
kind={kinds.DANGER}
onPress={onDeleteCustomFormatPress}
>
{translate('Delete')}
</Button>
}
<div className={styles.rightButtons}>
{
id &&
<Button
className={styles.deleteButton}
kind={kinds.DANGER}
onPress={onDeleteCustomFormatPress}
>
{translate('Delete')}
</Button>
}
{
!id &&
<Button
className={styles.deleteButton}
onPress={this.onImportPress}
>
{translate('Import')}
</Button>
}
<Button
className={styles.deleteButton}
onPress={this.onImportPress}
>
{translate('Import')}
</Button>
</div>
<Button
onPress={onModalClose}