From 18179fd34551680bd65df7c0c3caaa5945d1e94d Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Mon, 17 Jun 2019 11:35:47 -0230 Subject: Add delete to custom RPC form (#6718, #6650) --- .../page-container-footer.component.js | 4 +- ui/app/pages/settings/index.scss | 10 +- ui/app/pages/settings/networks-tab/index.scss | 30 ++++- .../network-form/network-form.component.js | 128 +++++++++++++++++---- .../networks-tab/networks-tab.component.js | 80 +++++++++---- .../networks-tab/networks-tab.constants.js | 9 ++ .../networks-tab/networks-tab.container.js | 4 + ui/app/pages/settings/settings.component.js | 2 +- 8 files changed, 208 insertions(+), 59 deletions(-) (limited to 'ui') diff --git a/ui/app/components/ui/page-container/page-container-footer/page-container-footer.component.js b/ui/app/components/ui/page-container/page-container-footer/page-container-footer.component.js index 4ef203521..a2cf0100b 100644 --- a/ui/app/components/ui/page-container/page-container-footer/page-container-footer.component.js +++ b/ui/app/components/ui/page-container/page-container-footer/page-container-footer.component.js @@ -8,6 +8,7 @@ export default class PageContainerFooter extends Component { children: PropTypes.node, onCancel: PropTypes.func, cancelText: PropTypes.string, + cancelButtonType: PropTypes.string, onSubmit: PropTypes.func, submitText: PropTypes.string, disabled: PropTypes.bool, @@ -29,6 +30,7 @@ export default class PageContainerFooter extends Component { disabled, submitButtonType, hideCancel, + cancelButtonType, } = this.props return ( @@ -36,7 +38,7 @@ export default class PageContainerFooter extends Component {
{!hideCancel && + ) + } + + + ) } diff --git a/ui/app/pages/settings/networks-tab/networks-tab.component.js b/ui/app/pages/settings/networks-tab/networks-tab.component.js index 2f921a892..f6c8443cf 100644 --- a/ui/app/pages/settings/networks-tab/networks-tab.component.js +++ b/ui/app/pages/settings/networks-tab/networks-tab.component.js @@ -25,6 +25,7 @@ export default class NetworksTab extends PureComponent { setNetworksTabAddMode: PropTypes.func.isRequired, setRpcTarget: PropTypes.func.isRequired, setSelectedSettingsRpcUrl: PropTypes.func.isRequired, + delRpcTarget: PropTypes.func.isRequired, providerUrl: PropTypes.string, providerType: PropTypes.string, networkDefaultedToProvider: PropTypes.bool, @@ -62,7 +63,7 @@ export default class NetworksTab extends PureComponent { { this.context.t('networks') }