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 ( return (
<div> <div>
<div>{ _balance }</div> <div className="text-right">{ _balance }</div>
{ _fiatPriceTotal > 0 && { _fiatPriceTotal > 0 &&
_fiatPricePerCoin > 0 && _fiatPricePerCoin > 0 &&
<div <div
data-tip={ `Price per 1 ${this.props.ActiveCoin.coin} ~ $${formatValue(_fiatPricePerCoin)}` } data-tip={ `Price per 1 ${this.props.ActiveCoin.coin} ~ $${formatValue(_fiatPricePerCoin)}` }
className="text-right">${ formatValue(_fiatPriceTotal) }</div> className="text-right">${ formatValue(_fiatPriceTotal) }</div>
} }
{ _fiatPriceTotal > 0 &&
_fiatPricePerCoin > 0 &&
<ReactTooltip
effect="solid"
className="text-left" />
}
</div> </div>
); );
} else { } 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') } { this.props.ActiveCoin.coin === 'CHIPS' || this.props.ActiveCoin.mode === 'spv' ? translate('INDEX.BALANCE') : translate('INDEX.TRANSPARENT_BALANCE') }
</div> </div>
<span <span
className="pull-right padding-top-10 font-size-22" className="pull-right padding-top-10 font-size-22">
data-tip={ Config.roundValues ? this.renderBalance('transparent') : '' }>
{ this.renderBalance('transparent', true) } { this.renderBalance('transparent', true) }
</span> </span>
<ReactTooltip
effect="solid"
className="text-left" />
</div> </div>
</div> </div>
</div> </div>

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

@ -18,4 +18,7 @@
font-size: 20px; font-size: 20px;
padding-top: 16px !important; 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() { componentWillMount() {
Store.dispatch(prices()); if (Config.fiatRates) {
this.pricesInterval = setInterval(() => {
Store.dispatch(prices()); Store.dispatch(prices());
}, PRICES_UPDATE_INTERVAL); this.pricesInterval = setInterval(() => {
Store.dispatch(prices());
}, PRICES_UPDATE_INTERVAL);
}
if (mainWindow.createSeed.triggered && if (mainWindow.createSeed.triggered &&
!mainWindow.createSeed.secondaryLoginPH) { !mainWindow.createSeed.secondaryLoginPH) {

Loading…
Cancel
Save