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:
Jaco Greeff
2017-02-22 15:26:58 +01:00
committed by GitHub
parent 49675483c3
commit 6938a7a202
45 changed files with 1009 additions and 666 deletions

View File

@@ -318,22 +318,26 @@ class Accounts extends Component {
onNewAccountClick = () => {
this.setState({
newDialog: !this.state.newDialog
newDialog: true
});
}
onNewWalletClick = () => {
this.setState({
newWalletDialog: !this.state.newWalletDialog
newWalletDialog: true
});
}
onNewAccountClose = () => {
this.onNewAccountClick();
this.setState({
newDialog: false
});
}
onNewWalletClose = () => {
this.onNewWalletClick();
this.setState({
newWalletDialog: false
});
}
onNewAccountUpdate = () => {

View File

@@ -153,7 +153,7 @@ class Address extends Component {
<Button
key='delete'
icon={ <ActionDelete /> }
label='delete address'
label='forget address'
onClick={ this.showDeleteDialog }
/>
];

View File

@@ -30,7 +30,7 @@ import { newError } from '~/redux/actions';
import { setVisibleAccounts } from '~/redux/providers/personalActions';
import { EditMeta, ExecuteContract } from '~/modals';
import { Actionbar, Button, Page, Modal } from '~/ui';
import { Actionbar, Button, Page, Portal } from '~/ui';
import Editor from '~/ui/Editor';
import Header from '../Account/Header';
@@ -198,10 +198,11 @@ class Contract extends Component {
);
return (
<Modal
actions={ [ cancelBtn ] }
<Portal
buttons={ [ cancelBtn ] }
onClose={ this.closeDetailsDialog }
open
title={ 'contract details' }
visible
>
<div className={ styles.details }>
{ this.renderSource(contract) }
@@ -216,7 +217,7 @@ class Contract extends Component {
/>
</div>
</div>
</Modal>
</Portal>
);
}