Browse Source

coin tile stop action render cond fix

v0.25
pbca26 7 years ago
parent
commit
7e97066bf3
  1. 3
      react/src/components/dashboard/coinTile/coinTileItem.js
  2. 3
      react/src/components/dashboard/coinTile/coinTileItem.render.js

3
react/src/components/dashboard/coinTile/coinTileItem.js

@ -116,7 +116,7 @@ class CoinTileItem extends React.Component {
}
}
renderStopCoinButton() {
renderStopCoinButton(item) {
if (this.props.Main &&
this.props.Main.coins &&
this.props.Main.coins.native &&
@ -239,7 +239,6 @@ class CoinTileItem extends React.Component {
if (this.props.Dashboard &&
this.props.Dashboard.activeSection === 'wallets') {
if (mode === 'native') {
// Store.dispatch(iguanaActiveHandle(true));
const _propsDashboard = this.props.ActiveCoin;
const syncPercentage = _propsDashboard && _propsDashboard.progress && (parseFloat(parseInt(_propsDashboard.progress.blocks, 10) * 100 / parseInt(_propsDashboard.progress.longestchain, 10)).toFixed(2)).replace('NaN', 0);

3
react/src/components/dashboard/coinTile/coinTileItem.render.js

@ -28,7 +28,7 @@ const CoinTileItemRender = function() {
onClick={ () => this.toggleCoinMenu(item.coin) }
className="btn btn-default btn-xs clipboard-edexaddr coin-tile-context-menu-trigger coind-actions-menu">
<i
title="Toggle coin context menu"
title={ translate('INDEX.TOGGLE_COIN_CONTEXT_MENU') }
className="fa fa-ellipsis-v coin-tile-context-menu-trigger"></i>
</button>
{ this.state.toggledCoinMenu &&
@ -36,6 +36,7 @@ const CoinTileItemRender = function() {
<div className="coin-tile-context-menu">
<ul>
{ this.renderStopCoinButton() &&
item.mode === 'native' &&
<li onClick={ () => this.stopCoind(item.coin, item.mode) }>
<i className="icon fa-stop-circle margin-right-5"></i> { translate('DASHBOARD.STOP') }
</li>

Loading…
Cancel
Save