From 6ea6603d4ce8a1f2f8a6df4a635a5b20a81ccbef Mon Sep 17 00:00:00 2001 From: petitPapillon Date: Thu, 27 Jul 2017 23:11:06 +0200 Subject: [PATCH] Rename walletsNativeInfo to walletsInfo rename nativeActiveSection to activeSection --- .../dashboard/receiveCoin/receiveCoin.js | 4 ++-- .../dashboard/walletsBalance/walletsBalance.js | 2 +- .../walletsInfo.js} | 4 ++-- .../walletsInfo.render.js} | 4 ++-- .../walletsNative/walletsNative.render.js | 4 ++-- .../walletsNativeSend/walletsNativeSend.js | 2 +- .../components/dashboard/walletsNav/walletsNav.js | 6 +++--- .../dashboard/walletsTxInfo/walletsTxInfo.js | 2 +- react/src/reducers/activeCoin.js | 14 +++++++------- 9 files changed, 21 insertions(+), 21 deletions(-) rename react/src/components/dashboard/{walletsNativeInfo/walletsNativeInfo.js => walletsInfo/walletsInfo.js} (72%) rename react/src/components/dashboard/{walletsNativeInfo/walletsNativeInfo.render.js => walletsInfo/walletsInfo.render.js} (98%) diff --git a/react/src/components/dashboard/receiveCoin/receiveCoin.js b/react/src/components/dashboard/receiveCoin/receiveCoin.js index 9193512..d084cdd 100644 --- a/react/src/components/dashboard/receiveCoin/receiveCoin.js +++ b/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); } diff --git a/react/src/components/dashboard/walletsBalance/walletsBalance.js b/react/src/components/dashboard/walletsBalance/walletsBalance.js index 1dab912..bb30acc 100755 --- a/react/src/components/dashboard/walletsBalance/walletsBalance.js +++ b/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() { diff --git a/react/src/components/dashboard/walletsNativeInfo/walletsNativeInfo.js b/react/src/components/dashboard/walletsInfo/walletsInfo.js similarity index 72% rename from react/src/components/dashboard/walletsNativeInfo/walletsNativeInfo.js rename to react/src/components/dashboard/walletsInfo/walletsInfo.js index 6e025e1..11e7280 100644 --- a/react/src/components/dashboard/walletsNativeInfo/walletsNativeInfo.js +++ b/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); } diff --git a/react/src/components/dashboard/walletsNativeInfo/walletsNativeInfo.render.js b/react/src/components/dashboard/walletsInfo/walletsInfo.render.js similarity index 98% rename from react/src/components/dashboard/walletsNativeInfo/walletsNativeInfo.render.js rename to react/src/components/dashboard/walletsInfo/walletsInfo.render.js index 07bd784..b128057 100644 --- a/react/src/components/dashboard/walletsNativeInfo/walletsNativeInfo.render.js +++ b/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 (
@@ -146,4 +146,4 @@ const WalletsNativeInfoRender = function() { ); }; -export default WalletsNativeInfoRender; \ No newline at end of file +export default WalletsInfoRender; \ No newline at end of file diff --git a/react/src/components/dashboard/walletsNative/walletsNative.render.js b/react/src/components/dashboard/walletsNative/walletsNative.render.js index 72ecaaf..e71ca60 100644 --- a/react/src/components/dashboard/walletsNative/walletsNative.render.js +++ b/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() { - +
diff --git a/react/src/components/dashboard/walletsNativeSend/walletsNativeSend.js b/react/src/components/dashboard/walletsNativeSend/walletsNativeSend.js index 3bc67df..21e2f46 100644 --- a/react/src/components/dashboard/walletsNativeSend/walletsNativeSend.js +++ b/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); } diff --git a/react/src/components/dashboard/walletsNav/walletsNav.js b/react/src/components/dashboard/walletsNav/walletsNav.js index 0835bfd..02221d6 100644 --- a/react/src/components/dashboard/walletsNav/walletsNav.js +++ b/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 { diff --git a/react/src/components/dashboard/walletsTxInfo/walletsTxInfo.js b/react/src/components/dashboard/walletsTxInfo/walletsTxInfo.js index 3055c67..e988b6f 100644 --- a/react/src/components/dashboard/walletsTxInfo/walletsTxInfo.js +++ b/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); } diff --git a/react/src/reducers/activeCoin.js b/react/src/reducers/activeCoin.js index ec0dee3..0a976a6 100644 --- a/react/src/reducers/activeCoin.js +++ b/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, {