Convert all remaining Modals to use Portal (UI consistency) (#4625)
* FirstRun dialog -> Portal * CreateAccount Modal -> Portal * CreateWallet dialog -> Portal * Transfer dialog -> Portal * Fix failing tests * ShapeShift dialog -> Portal * Verification dialog -> Portal * EditMeta dialog -> Portal * PasswordManager dialog -> Portal * WalletSettings dialog -> Portal * AddAddress dialog -> Portal * s/delete address/forget address/ * AddContract dialog -> Portal * DeployContract dialog -> Portal * ExceuteContract dialog -> Portal * LoadContract dialog -> Portal * SaveContract dialog -> Portal * UpgradeParity dialog -> Portal * Convert inline modals (tsk, tsk) * Remove ui/Modal * Import dialog i18n * Button array returns (thanks @derhuerst) * Unneeded debug * Typo * Readability formatting
This commit is contained in:
@@ -20,7 +20,7 @@ import React, { Component, PropTypes } from 'react';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import { BusyStep, Button, CompletedStep, CopyToClipboard, GasPriceEditor, IdentityIcon, Modal, TxHash, Warning } from '~/ui';
|
||||
import { BusyStep, Button, CompletedStep, CopyToClipboard, GasPriceEditor, IdentityIcon, Portal, TxHash, Warning } from '~/ui';
|
||||
import { CancelIcon, DoneIcon } from '~/ui/Icons';
|
||||
import { ERRORS, validateAbi, validateCode, validateName } from '~/util/validation';
|
||||
|
||||
@@ -166,21 +166,22 @@ class DeployContract extends Component {
|
||||
: null;
|
||||
|
||||
return (
|
||||
<Modal
|
||||
actions={ this.renderDialogActions() }
|
||||
current={ realStep }
|
||||
<Portal
|
||||
buttons={ this.renderDialogActions() }
|
||||
activeStep={ realStep }
|
||||
busySteps={ waiting }
|
||||
onClose={ this.onClose }
|
||||
open
|
||||
steps={
|
||||
realSteps
|
||||
? realSteps.map((s) => s.title)
|
||||
: null
|
||||
}
|
||||
title={ title }
|
||||
visible
|
||||
waiting={ waiting }
|
||||
>
|
||||
{ this.renderExceptionWarning() }
|
||||
{ this.renderStep() }
|
||||
</Modal>
|
||||
</Portal>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -207,6 +208,7 @@ class DeployContract extends Component {
|
||||
const cancelBtn = (
|
||||
<Button
|
||||
icon={ <CancelIcon /> }
|
||||
key='cancel'
|
||||
label={
|
||||
<FormattedMessage
|
||||
id='deployContract.button.cancel'
|
||||
@@ -220,6 +222,7 @@ class DeployContract extends Component {
|
||||
const closeBtn = (
|
||||
<Button
|
||||
icon={ <CancelIcon /> }
|
||||
key='close'
|
||||
label={
|
||||
<FormattedMessage
|
||||
id='deployContract.button.close'
|
||||
@@ -233,6 +236,7 @@ class DeployContract extends Component {
|
||||
const closeBtnOk = (
|
||||
<Button
|
||||
icon={ <DoneIcon /> }
|
||||
key='done'
|
||||
label={
|
||||
<FormattedMessage
|
||||
id='deployContract.button.done'
|
||||
@@ -253,6 +257,7 @@ class DeployContract extends Component {
|
||||
cancelBtn,
|
||||
<Button
|
||||
disabled={ !isValid }
|
||||
key='next'
|
||||
icon={
|
||||
<IdentityIcon
|
||||
address={ fromAddress }
|
||||
@@ -279,6 +284,7 @@ class DeployContract extends Component {
|
||||
button
|
||||
/>
|
||||
}
|
||||
key='create'
|
||||
label={
|
||||
<FormattedMessage
|
||||
id='deployContract.button.create'
|
||||
|
||||
Reference in New Issue
Block a user