Browse Source

basilisk progress notification

all-modes
pbca26 8 years ago
parent
commit
f41d674987
  1. 4
      react/src/components/dashboard/dashboard.js
  2. 3
      react/src/components/dashboard/walletsBasiliskRefresh.js
  3. 15
      react/src/components/dashboard/walletsData.js

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

@ -13,8 +13,6 @@ import Jumblr from './jumblr';
import Settings from './settings';
import ReceiveCoin from './receiveCoin';
import About from './about';
import WalletsBasiliskRefresh from './walletsBasiliskRefresh';
import WalletsBasiliskConnection from './walletsBasiliskConnection';
import WalletsNative from './walletsNative';
import WalletsNativeTxInfo from './walletsNativeTxInfo';
import WalletsTxInfo from './walletsTxInfo';
@ -41,8 +39,6 @@ class Dashboard extends React.Component {
<SendCoin {...this.props} />
<ReceiveCoin {...this.props.ActiveCoin} />
<WalletsData {...this.props} />
<WalletsBasiliskRefresh {...this.props} />
<WalletsBasiliskConnection {...this.props} />
<WalletsTxInfo {...this.props} />
<WalletsNative {...this.props} />
<WalletsNativeTxInfo {...this.props} />

3
react/src/components/dashboard/walletsBasiliskRefresh.js

@ -26,7 +26,8 @@ class WalletsBasiliskRefresh extends React.Component {
<th>{translate('INDEX.REFRESH')}</th>
</tr>
</thead>
<tbody></tbody>
<tbody>
</tbody>
</table>
</div>
</div>

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

@ -11,6 +11,9 @@ import {
} from '../../actions/actionCreators';
import Store from '../../store';
import WalletsBasiliskRefresh from './walletsBasiliskRefresh';
import WalletsBasiliskConnection from './walletsBasiliskConnection';
import { SocketProvider } from 'socket.io-react';
import io from 'socket.io-client';
@ -53,7 +56,7 @@ class WalletsData extends React.Component {
}));
}
if (data && data.message && data.message.shepherd.method && data.message.shepherd.method === 'cache-one' && data.message.shepherd.status === 'done') {
//_totalStackLength = _currentStackLength = 0;
Store.dispatch(basiliskRefresh(false));
}
}
@ -323,6 +326,9 @@ class WalletsData extends React.Component {
render() {
if (this.props && this.props.ActiveCoin && this.props.ActiveCoin.coin && this.props.ActiveCoin.mode !== 'native' && !this.props.ActiveCoin.send && !this.props.ActiveCoin.receive) {
return (
<span>
<WalletsBasiliskRefresh {...this.props} />
<WalletsBasiliskConnection {...this.props} />
<div data-edexcoin="COIN" id="edexcoin_dashboardinfo">
<div className="col-xs-12 margin-top-20">
<div className="panel nav-tabs-horizontal">
@ -330,9 +336,11 @@ class WalletsData extends React.Component {
<div className="col-xlg-12 col-lg-12 col-sm-12 col-xs-12 edexcoin_dashoard_section_main_div">
<div id="edexcoin_txhistory" className="panel">
<header className="panel-heading" style={{zIndex: '10'}}>
Sockets: {this.state.currentStackLength} / {this.state.totalStackLength}
<div className={this.props.ActiveCoin.mode === 'basilisk' ? 'panel-actions' : 'panel-actions hide'}>
<a href="javascript:void(0)" className="dropdown-toggle white btn-xs btn-info btn_refresh_edexcoin_dashboard" data-edexcoin="COIN" aria-expanded="false" role="button" onClick={this.refreshTxList}>
<div className={this.state.currentStackLength === 1 || (this.state.currentStackLength === 0 && this.state.totalStackLength === 0) ? 'hide' : ''}>
<strong>Processing requests:</strong> {this.state.currentStackLength} / {this.state.totalStackLength}
</div>
<a href="javascript:void(0)" className="dropdown-toggle white btn-xs btn-info btn_refresh_edexcoin_dashboard margin-right-10" data-edexcoin="COIN" aria-expanded="false" role="button" onClick={this.refreshTxList}>
<i className="icon fa-refresh margin-right-10" aria-hidden="true"></i> {translate('INDEX.REFRESH')}
</a>
<div className={this.state.basiliskActionsMenu ? 'dropdown open' : 'dropdown'} onClick={this.toggleBasiliskActionsMenu}>
@ -420,6 +428,7 @@ class WalletsData extends React.Component {
</div>
</div>
</div>
</span>
);
} else {
return null;

Loading…
Cancel
Save