diff --git a/react/src/components/dashboard/dashboard.js b/react/src/components/dashboard/dashboard.js index fbbbe17..63d780f 100644 --- a/react/src/components/dashboard/dashboard.js +++ b/react/src/components/dashboard/dashboard.js @@ -17,6 +17,7 @@ import WalletsBasiliskRefresh from './walletsBasiliskRefresh'; import WalletsBasiliskConnection from './walletsBasiliskConnection'; import WalletsNative from './walletsNative'; import WalletsNativeTxInfo from './walletsNativeTxInfo'; +import WalletsTxInfo from './walletsTxInfo'; class Dashboard extends React.Component { constructor(props) { @@ -42,6 +43,7 @@ class Dashboard extends React.Component { + diff --git a/react/src/components/dashboard/walletsData.js b/react/src/components/dashboard/walletsData.js index 92a1e0b..4a0c3bb 100644 --- a/react/src/components/dashboard/walletsData.js +++ b/react/src/components/dashboard/walletsData.js @@ -1,7 +1,12 @@ import React from 'react'; import { translate } from '../../translate/translate'; import { secondsToString } from '../../util/time'; -import { basiliskRefresh, basiliskConnection, getDexNotaries } from '../../actions/actionCreators'; +import { + basiliskRefresh, + basiliskConnection, + getDexNotaries, + toggleDashboardTxInfoModal +} from '../../actions/actionCreators'; import Store from '../../store'; class WalletsData extends React.Component { @@ -53,6 +58,10 @@ class WalletsData extends React.Component { }); } + toggleTxInfoModal(display, txIndex) { + Store.dispatch(toggleDashboardTxInfoModal(display, txIndex)); + } + componentWillReceiveProps(props) { if (this.props.ActiveCoin.txhistory && this.props.ActiveCoin.txhistory.length) { if (!this.state.itemsList || (this.state.itemsList && !this.state.itemsList.length) || (props.ActiveCoin.txhistory !== this.props.ActiveCoin.txhistory)) { diff --git a/react/src/components/dashboard/walletsNativeTxInfo.js b/react/src/components/dashboard/walletsNativeTxInfo.js index dda1b3f..6a5476c 100644 --- a/react/src/components/dashboard/walletsNativeTxInfo.js +++ b/react/src/components/dashboard/walletsNativeTxInfo.js @@ -24,7 +24,7 @@ class WalletsNativeTxInfo extends React.Component { } render() { - if (this.props && this.props.ActiveCoin.showTransactionInfo && this.props.ActiveCoin.nativeActiveSection === 'default') { + if (this.props && this.props.ActiveCoin.showTransactionInfo && this.props.ActiveCoin.nativeActiveSection === 'default' && this.props.ActiveCoin.mode === 'native') { const txInfo = this.props.ActiveCoin.txhistory[this.props.ActiveCoin.showTransactionInfoTxIndex]; return ( @@ -143,10 +143,10 @@ class WalletsNativeTxInfo extends React.Component {
- +
- +
diff --git a/react/src/components/dashboard/walletsTxInfo.js b/react/src/components/dashboard/walletsTxInfo.js new file mode 100644 index 0000000..c5fed44 --- /dev/null +++ b/react/src/components/dashboard/walletsTxInfo.js @@ -0,0 +1,127 @@ +import React from 'react'; +import { translate } from '../../translate/translate'; +import { secondsToString } from '../../util/time'; +import { toggleDashboardTxInfoModal } from '../../actions/actionCreators'; +import Store from '../../store'; + +class WalletsTxInfo extends React.Component { + constructor(props) { + super(props); + this.state = { + activeTab: 0, + }; + this.toggleTxInfoModal = this.toggleTxInfoModal.bind(this); + } + + toggleTxInfoModal() { + Store.dispatch(toggleDashboardTxInfoModal(false)); + } + + openTab(tab) { + this.setState(Object.assign({}, this.state, { + activeTab: tab, + })); + } + + render() { + if (this.props && this.props.ActiveCoin.showTransactionInfo && this.props.ActiveCoin.mode !== 'native') { + const txInfo = this.props.ActiveCoin.txhistory[this.props.ActiveCoin.showTransactionInfoTxIndex]; + + return ( +
+ +
+
+ ); + } else { + return null; + } + } +} + +export default WalletsTxInfo;