Browse Source

Rename walletsNativeInfo to walletsInfo

rename nativeActiveSection to activeSection
all-modes
petitPapillon 8 years ago
parent
commit
6ea6603d4c
  1. 4
      react/src/components/dashboard/receiveCoin/receiveCoin.js
  2. 2
      react/src/components/dashboard/walletsBalance/walletsBalance.js
  3. 4
      react/src/components/dashboard/walletsInfo/walletsInfo.js
  4. 4
      react/src/components/dashboard/walletsInfo/walletsInfo.render.js
  5. 4
      react/src/components/dashboard/walletsNative/walletsNative.render.js
  6. 2
      react/src/components/dashboard/walletsNativeSend/walletsNativeSend.js
  7. 6
      react/src/components/dashboard/walletsNav/walletsNav.js
  8. 2
      react/src/components/dashboard/walletsTxInfo/walletsTxInfo.js
  9. 14
      react/src/reducers/activeCoin.js

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

@ -146,10 +146,10 @@ class ReceiveCoin extends React.Component {
}
render() {
// TODO nativeActiveSection === 'receive' should be removed when native mode is fully merged
// TODO activeSection === 'receive' should be removed when native mode is fully merged
// into the rest of the components
if (this.props &&
(this.props.receive || (this.isNativeMode() && this.props.nativeActiveSection === 'receive'))) {
(this.props.receive || (this.isNativeMode() && this.props.activeSection === 'receive'))) {
return ReceiveCoinRender.call(this);
}

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

@ -103,7 +103,7 @@ class WalletsBalance extends React.Component {
}
isNativeBalanceActive() {
return this.isNativeMode() && this.props.ActiveCoin.nativeActiveSection === 'default';
return this.isNativeMode() && this.props.ActiveCoin.activeSection === 'default';
}
isNonNativeBalanceActive() {

4
react/src/components/dashboard/walletsNativeInfo/walletsNativeInfo.js → react/src/components/dashboard/walletsInfo/walletsInfo.js

@ -1,5 +1,5 @@
import React from 'react';
import WalletsNativeInfoRender from './walletsNativeInfo.render';
import WalletsNativeInfoRender from './walletsInfo.render';
class WalletsNativeInfo extends React.Component {
constructor(props) {
@ -10,7 +10,7 @@ class WalletsNativeInfo extends React.Component {
if (this.props &&
this.props.Dashboard &&
this.props.Dashboard.progress &&
this.props.ActiveCoin.nativeActiveSection === 'settings') {
this.props.ActiveCoin.activeSection === 'settings') {
return WalletsNativeInfoRender.call(this);
}

4
react/src/components/dashboard/walletsNativeInfo/walletsNativeInfo.render.js → react/src/components/dashboard/walletsInfo/walletsInfo.render.js

@ -1,7 +1,7 @@
import React from 'react';
import { translate } from '../../../translate/translate';
const WalletsNativeInfoRender = function() {
const WalletsInfoRender = function() {
return (
<div>
<div className="col-xlg-6 col-md-4">
@ -146,4 +146,4 @@ const WalletsNativeInfoRender = function() {
);
};
export default WalletsNativeInfoRender;
export default WalletsInfoRender;

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

@ -1,6 +1,6 @@
import React from 'react';
import WalletsBalance from '../walletsBalance/walletsBalance';
import WalletsNativeInfo from '../walletsNativeInfo/walletsNativeInfo';
import WalletsInfo from '../walletsInfo/walletsInfo';
import WalletsNativeSend from '../walletsNativeSend/walletsNativeSend';
import WalletsProgress from '../walletsProgress/walletsProgress';
import WalletsData from '../walletsData/walletsData';
@ -32,7 +32,7 @@ const WalletsNativeRender = function() {
<ReceiveCoin {...this.props.ActiveCoin} />
<WalletsData {...this.props} />
<WalletsNativeSend {...this.props} />
<WalletsNativeInfo {...this.props} />
<WalletsInfo {...this.props} />
</div>
</div>
</div>

2
react/src/components/dashboard/walletsNativeSend/walletsNativeSend.js

@ -279,7 +279,7 @@ class WalletsNativeSend extends React.Component {
render() {
if (this.props &&
this.props.ActiveCoin &&
this.props.ActiveCoin.nativeActiveSection === 'send') {
this.props.ActiveCoin.activeSection === 'send') {
return WalletsNativeSendRender.call(this);
}

6
react/src/components/dashboard/walletsNav/walletsNav.js

@ -35,7 +35,7 @@ class WalletsNav extends React.Component {
if (this.props.ActiveCoin.mode === 'native') {
Store.dispatch(
toggleDashboardActiveSection(
this.props.ActiveCoin.nativeActiveSection === 'settings' ? 'default' : 'settings'
this.props.ActiveCoin.activeSection === 'settings' ? 'default' : 'settings'
)
);
} else {
@ -47,7 +47,7 @@ class WalletsNav extends React.Component {
if (this.props.ActiveCoin.mode === 'native') {
Store.dispatch(
toggleDashboardActiveSection(
this.props.ActiveCoin.nativeActiveSection === 'send' ? 'default' : 'send'
this.props.ActiveCoin.activeSection === 'send' ? 'default' : 'send'
)
);
} else {
@ -59,7 +59,7 @@ class WalletsNav extends React.Component {
if (this.props.ActiveCoin.mode === 'native') {
Store.dispatch(
toggleDashboardActiveSection(
this.props.ActiveCoin.nativeActiveSection === 'receive' ? 'default' : 'receive'
this.props.ActiveCoin.activeSection === 'receive' ? 'default' : 'receive'
)
);
} else {

2
react/src/components/dashboard/walletsTxInfo/walletsTxInfo.js

@ -39,7 +39,7 @@ class WalletsTxInfo extends React.Component {
// TODO the conditions below should be merged once the native mode components are fully merged
// into the rest of the components
(!this.isNativeMode() ||
(this.isNativeMode() && this.props.ActiveCoin.nativeActiveSection === 'default'))) {
(this.isNativeMode() && this.props.ActiveCoin.activeSection === 'default'))) {
const txInfo = sortByDate(this.props.ActiveCoin.txhistory)[this.props.ActiveCoin.showTransactionInfoTxIndex];
return WalletsTxInfoRender.call(this, txInfo);
}

14
react/src/reducers/activeCoin.js

@ -27,7 +27,7 @@ export function ActiveCoin(state = {
send: false,
receive: false,
balance: 0,
nativeActiveSection: 'default',
activeSection: 'default',
showTransactionInfo: false,
showTransactionInfoTxIndex: null,
txhistory: [],
@ -53,7 +53,7 @@ export function ActiveCoin(state = {
receive: state.receive,
showTransactionInfo: state.showTransactionInfo,
showTransactionInfoTxIndex: state.showTransactionInfoTxIndex,
nativeActiveSection: state.nativeActiveSection,
activeSection: state.activeSection,
lastSendToResponse: state.lastSendToResponse,
mainBasiliskAddress: state.mainBasiliskAddress,
opids: state.opids,
@ -73,7 +73,7 @@ export function ActiveCoin(state = {
receive: _coinData.receive,
showTransactionInfo: _coinData.showTransactionInfo,
showTransactionInfoTxIndex: _coinData.showTransactionInfoTxIndex,
nativeActiveSection: _coinData.nativeActiveSection,
activeSection: _coinData.activeSection,
lastSendToResponse: _coinData.lastSendToResponse,
mainBasiliskAddress: _coinData.mainBasiliskAddress,
opids: _coinData.opids,
@ -91,7 +91,7 @@ export function ActiveCoin(state = {
receive: state.receive,
showTransactionInfo: state.showTransactionInfo,
showTransactionInfoTxIndex: state.showTransactionInfoTxIndex,
nativeActiveSection: state.nativeActiveSection,
activeSection: state.activeSection,
lastSendToResponse: state.lastSendToResponse,
mainBasiliskAddress: state.mainBasiliskAddress,
opids: state.opids,
@ -110,7 +110,7 @@ export function ActiveCoin(state = {
receive: false,
showTransactionInfo: false,
showTransactionInfoTxIndex: null,
nativeActiveSection: 'default',
activeSection: 'default',
});
} else {
return Object.assign({}, state, {
@ -122,7 +122,7 @@ export function ActiveCoin(state = {
receive: false,
showTransactionInfo: false,
showTransactionInfoTxIndex: null,
nativeActiveSection: 'default',
activeSection: 'default',
});
}
}
@ -151,7 +151,7 @@ export function ActiveCoin(state = {
});
case DASHBOARD_ACTIVE_SECTION:
return Object.assign({}, state, {
nativeActiveSection: action.section,
activeSection: action.section,
});
case DASHBOARD_ACTIVE_TXINFO_MODAL:
return Object.assign({}, state, {

Loading…
Cancel
Save