Browse Source

reset add coin form

all-modes
pbca26 8 years ago
parent
commit
1d1bc6222c
  1. 20
      react/src/components/addcoin/addcoin.js
  2. 9
      react/src/components/dashboard/navbar.js
  3. 4
      react/src/components/dashboard/walletsData.js

20
react/src/components/addcoin/addcoin.js

@ -126,7 +126,7 @@ class AddCoin extends React.Component {
}
this.setState(Object.assign({}, this.state, {
coins: _coins
coins: _coins,
}));
}
@ -164,6 +164,11 @@ class AddCoin extends React.Component {
this.state.coins[0].mode,
this.state.coins[0].syncOnly
));
this.removeCoin();
this.addNewItem();
Store.dispatch(toggleAddcoinModal(false, false));
}
dismiss() {
@ -204,7 +209,18 @@ class AddCoin extends React.Component {
_item.mode,
_item.syncOnly
));
}, 2000 * i);
if (i === this.state.coins.length - 1) {
let _coins = [];
_coins.push(this.state.defaultCoinState);
this.setState(Object.assign({}, this.state, {
coins: _coins,
}));
Store.dispatch(toggleAddcoinModal(false, false));
}
}.bind(this), 2000 * i);
}
}

9
react/src/components/dashboard/navbar.js

@ -1,6 +1,11 @@
import React from 'react';
import { translate } from '../../translate/translate';
import { dashboardChangeSection, toggleAddcoinModal, logout } from '../../actions/actionCreators';
import {
dashboardChangeSection,
toggleAddcoinModal,
logout,
stopInterval
} from '../../actions/actionCreators';
import Store from '../../store';
class Navbar extends React.Component {
@ -28,6 +33,8 @@ class Navbar extends React.Component {
}
logout() {
Store.dispatch(stopInterval('sync', this.props.Interval.interval));
Store.dispatch(stopInterval('basilisk', this.props.Interval.interval));
Store.dispatch(logout());
}

4
react/src/components/dashboard/walletsData.js

@ -134,7 +134,7 @@ class WalletsData extends React.Component {
}));
}
basiliskRefreshActionOne() {
basiliskRefreshAction() {
Store.dispatch(fetchNewCacheData({
'pubkey': this.props.Dashboard.activeHandle.pubkey,
'allcoins': false,
@ -143,7 +143,7 @@ class WalletsData extends React.Component {
}));
}
basiliskRefreshAction() {
basiliskRefreshActionOne() {
Store.dispatch(fetchNewCacheData({
'pubkey': this.props.Dashboard.activeHandle.pubkey,
'allcoins': false,

Loading…
Cancel
Save