* Shw busy indicator on Address forget * Remove debug logs
This commit is contained in:
parent
54536dfa1b
commit
4becd27029
@ -69,14 +69,14 @@ export default class ConfirmDialog extends Component {
|
|||||||
<Portal
|
<Portal
|
||||||
buttons={ [
|
buttons={ [
|
||||||
<Button
|
<Button
|
||||||
disabled={ disabledDeny }
|
disabled={ disabledDeny || busy }
|
||||||
icon={ iconDeny || <CancelIcon /> }
|
icon={ iconDeny || <CancelIcon /> }
|
||||||
key='deny'
|
key='deny'
|
||||||
label={ labelDeny || DEFAULT_NO }
|
label={ labelDeny || DEFAULT_NO }
|
||||||
onClick={ onDeny }
|
onClick={ onDeny }
|
||||||
/>,
|
/>,
|
||||||
<Button
|
<Button
|
||||||
disabled={ disabledConfirm }
|
disabled={ disabledConfirm || busy }
|
||||||
icon={ iconConfirm || <CheckIcon /> }
|
icon={ iconConfirm || <CheckIcon /> }
|
||||||
key='confirm'
|
key='confirm'
|
||||||
label={ labelConfirm || DEFAULT_YES }
|
label={ labelConfirm || DEFAULT_YES }
|
||||||
|
@ -41,8 +41,13 @@ class Delete extends Component {
|
|||||||
newError: PropTypes.func
|
newError: PropTypes.func
|
||||||
};
|
};
|
||||||
|
|
||||||
|
state = {
|
||||||
|
isBusy: false
|
||||||
|
};
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
const { account, confirmMessage, visible } = this.props;
|
const { account, confirmMessage, visible } = this.props;
|
||||||
|
const { isBusy } = this.state;
|
||||||
|
|
||||||
if (!visible) {
|
if (!visible) {
|
||||||
return null;
|
return null;
|
||||||
@ -50,6 +55,7 @@ class Delete extends Component {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<ConfirmDialog
|
<ConfirmDialog
|
||||||
|
busy={ isBusy }
|
||||||
className={ styles.delete }
|
className={ styles.delete }
|
||||||
title={
|
title={
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
@ -99,6 +105,8 @@ class Delete extends Component {
|
|||||||
const { api, router } = this.context;
|
const { api, router } = this.context;
|
||||||
const { account, route, newError } = this.props;
|
const { account, route, newError } = this.props;
|
||||||
|
|
||||||
|
this.setState({ isBusy: true });
|
||||||
|
|
||||||
api.parity
|
api.parity
|
||||||
.removeAddress(account.address)
|
.removeAddress(account.address)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
Loading…
Reference in New Issue
Block a user