Browse Source

Merge balance components - display walletsBalance in native mode

all-modes
petitPapillon 8 years ago
parent
commit
33cbd8025c
  1. 4
      react/src/components/dashboard/main/dashboard.js
  2. 2
      react/src/components/dashboard/main/dashboard.render.js
  3. 15
      react/src/components/dashboard/walletsBalance/walletsBalance.js
  4. 3
      react/src/components/dashboard/walletsBalance/walletsBalance.render.js
  5. 5
      react/src/components/dashboard/walletsNative/walletsNative.render.js
  6. 5
      react/src/components/dashboard/walletsNativeBalance/walletsNativeBalance.js

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

@ -26,6 +26,10 @@ class Dashboard extends React.Component {
this.props.Main.isLoggedIn;
}
isNativeMode() {
return this.props.ActiveCoin.mode === 'native';
}
render() {
if (this.isLoggedIn()) {
return this.renderDashboard();

2
react/src/components/dashboard/main/dashboard.render.js

@ -28,7 +28,7 @@ const DashboardRender = function() {
<CoinTile {...this.props} />
<WalletsNav {...this.props} />
<WalletsProgress {...this.props} />
<WalletsBalance {...this.props} />
{ !this.isNativeMode() && <WalletsBalance {...this.props} />}
<SendCoin {...this.props} />
<ReceiveCoin {...this.props.ActiveCoin} />
<WalletsData {...this.props} />

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

@ -89,13 +89,22 @@ class WalletsBalance extends React.Component {
);
}
isNativeMode() {
return this.isActiveCoinMode('native');
}
render() {
console.log('wallets balance', this.props.ActiveCoin.nativeActiveSection,
(this.isNativeMode() && this.props.ActiveCoin.nativeActiveSection === 'default'));
if (this.props &&
this.props.ActiveCoin &&
this.props.ActiveCoin.coin &&
this.props.ActiveCoin.mode !== 'native' &&
!this.props.ActiveCoin.send &&
!this.props.ActiveCoin.receive) {
// this.props.ActiveCoin.mode !== 'native' &&
((this.isNativeMode() && this.props.ActiveCoin.nativeActiveSection === 'default')
||
(!this.isNativeMode() && !this.props.ActiveCoin.send &&!this.props.ActiveCoin.receive))
)
{
return WalletsBalanceRender.call(this);
}

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

@ -4,7 +4,7 @@ import { translate } from '../../../translate/translate';
const WalletsBalanceRender = function() {
return (
<div id="wallet-widgets">
<div className="col-xs-12">
<div className="col-xs-12 teztt z-index-1">
<div className={ this.isActiveCoinMode('native') || (this.isActiveCoinMode('full') && !this.isFullySynced()) ? 'col-xs-12' : 'col-xs-12 hide' }>
<div className="alert alert-info alert-dismissible">
<button
@ -32,6 +32,7 @@ const WalletsBalanceRender = function() {
</div>
<div className={ this.isNativeOrBasiliskCoinMode() ? 'col-lg-4 col-xs-12' : 'col-lg-12 col-xs-12' }>
<div className="widget widget-shadow">
<div className="widget-content">
<div className="padding-20 padding-top-10">

5
react/src/components/dashboard/walletsNative/walletsNative.render.js

@ -1,5 +1,5 @@
import React from 'react';
import WalletsNativeBalance from '../walletsNativeBalance/walletsNativeBalance';
import WalletsBalance from '../walletsBalance/walletsBalance';
import WalletsNativeInfo from '../walletsNativeInfo/walletsNativeInfo';
import WalletsNativeReceive from '../walletsNativeReceive/walletsNativeReceive';
import WalletsNativeSend from '../walletsNativeSend/walletsNativeSend';
@ -26,7 +26,8 @@ const WalletsNativeRender = function() {
<div className="page-content">
<WalletsNativeSyncProgress {...this.props} />
<div className="row">
<WalletsNativeBalance {...this.props} />
<WalletsBalance {...this.props} />
{/*<WalletsNativeBalance {...this.props} />*/}
<WalletsNativeTxHistory {...this.props} />
<WalletsNativeReceive {...this.props} />
<WalletsNativeSend {...this.props} />

5
react/src/components/dashboard/walletsNativeBalance/walletsNativeBalance.js

@ -3,8 +3,9 @@ import WalletsNativeBalanceRender from './walletsNativeBalance.render';
class WalletsNativeBalance extends React.Component {
render() {
if (this.props &&
this.props.ActiveCoin.nativeActiveSection === 'default') {
if (false) {
// if (this.props &&
// this.props.ActiveCoin.nativeActiveSection === 'default') {
return WalletsNativeBalanceRender.call(this);
}

Loading…
Cancel
Save