Browse Source

fiat rates, balance styling fix

v0.25
pbca26 7 years ago
parent
commit
3df966a78e
  1. 8
      react/src/components/dashboard/walletsBalance/walletsBalance.js
  2. 6
      react/src/components/dashboard/walletsBalance/walletsBalance.render.js
  3. 3
      react/src/components/dashboard/walletsBalance/walletsBalance.scss
  4. 8
      react/src/components/dashboard/walletsMain/walletsMain.js

8
react/src/components/dashboard/walletsBalance/walletsBalance.js

@ -131,19 +131,13 @@ class WalletsBalance extends React.Component {
return (
<div>
<div>{ _balance }</div>
<div className="text-right">{ _balance }</div>
{ _fiatPriceTotal > 0 &&
_fiatPricePerCoin > 0 &&
<div
data-tip={ `Price per 1 ${this.props.ActiveCoin.coin} ~ $${formatValue(_fiatPricePerCoin)}` }
className="text-right">${ formatValue(_fiatPriceTotal) }</div>
}
{ _fiatPriceTotal > 0 &&
_fiatPricePerCoin > 0 &&
<ReactTooltip
effect="solid"
className="text-left" />
}
</div>
);
} else {

6
react/src/components/dashboard/walletsBalance/walletsBalance.render.js

@ -38,13 +38,9 @@ const WalletsBalanceRender = function() {
{ this.props.ActiveCoin.coin === 'CHIPS' || this.props.ActiveCoin.mode === 'spv' ? translate('INDEX.BALANCE') : translate('INDEX.TRANSPARENT_BALANCE') }
</div>
<span
className="pull-right padding-top-10 font-size-22"
data-tip={ Config.roundValues ? this.renderBalance('transparent') : '' }>
className="pull-right padding-top-10 font-size-22">
{ this.renderBalance('transparent', true) }
</span>
<ReactTooltip
effect="solid"
className="text-left" />
</div>
</div>
</div>

3
react/src/components/dashboard/walletsBalance/walletsBalance.scss

@ -18,4 +18,7 @@
font-size: 20px;
padding-top: 16px !important;
}
.padding-right-30 {
padding-right: 10px !important;
}
}

8
react/src/components/dashboard/walletsMain/walletsMain.js

@ -32,10 +32,12 @@ class WalletsMain extends React.Component {
}
componentWillMount() {
Store.dispatch(prices());
this.pricesInterval = setInterval(() => {
if (Config.fiatRates) {
Store.dispatch(prices());
}, PRICES_UPDATE_INTERVAL);
this.pricesInterval = setInterval(() => {
Store.dispatch(prices());
}, PRICES_UPDATE_INTERVAL);
}
if (mainWindow.createSeed.triggered &&
!mainWindow.createSeed.secondaryLoginPH) {

Loading…
Cancel
Save