diff --git a/react/src/components/dashboard/main/dashboard.render.js b/react/src/components/dashboard/main/dashboard.render.js index b6b31e6..dfc5911 100644 --- a/react/src/components/dashboard/main/dashboard.render.js +++ b/react/src/components/dashboard/main/dashboard.render.js @@ -14,7 +14,6 @@ import Settings from '../settings/settings'; import ReceiveCoin from '../receiveCoin/receiveCoin'; import About from '../about/about'; import WalletsNative from '../walletsNative/walletsNative'; -import WalletsNativeTxInfo from '../walletsNativeTxInfo/walletsNativeTxInfo'; import WalletsTxInfo from '../walletsTxInfo/walletsTxInfo'; const DashboardRender = function() { @@ -28,13 +27,14 @@ const DashboardRender = function() { - { !this.isNativeMode() && } + + + + - -
diff --git a/react/src/components/dashboard/walletsNative/walletsNative.render.js b/react/src/components/dashboard/walletsNative/walletsNative.render.js index 2123121..1be038b 100644 --- a/react/src/components/dashboard/walletsNative/walletsNative.render.js +++ b/react/src/components/dashboard/walletsNative/walletsNative.render.js @@ -16,7 +16,9 @@ const WalletsNativeRender = function() {
  1. - + { this.props.ActiveCoin.coin }
  2. diff --git a/react/src/components/dashboard/walletsNativeTxInfo/walletsNativeTxInfo.js b/react/src/components/dashboard/walletsNativeTxInfo/walletsNativeTxInfo.js deleted file mode 100644 index 39deb98..0000000 --- a/react/src/components/dashboard/walletsNativeTxInfo/walletsNativeTxInfo.js +++ /dev/null @@ -1,44 +0,0 @@ -import React from 'react'; -import { toggleDashboardTxInfoModal } from '../../../actions/actionCreators'; -import Store from '../../../store'; - -class WalletsNativeTxInfo 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, - })); - } - - handleKeydown(e) { - if (e.key === 'Escape') { - this.toggleTxInfoModal(); - } - } - - render() { - 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 WalletsNativeTxInfoRender.call(this, txInfo); - } else { - return null; - } - } -} - -export default WalletsNativeTxInfo; diff --git a/react/src/components/dashboard/walletsNativeTxInfo/walletsNativeTxInfo.render.js b/react/src/components/dashboard/walletsNativeTxInfo/walletsNativeTxInfo.render.js deleted file mode 100644 index 064d597..0000000 --- a/react/src/components/dashboard/walletsNativeTxInfo/walletsNativeTxInfo.render.js +++ /dev/null @@ -1,156 +0,0 @@ -import React from 'react'; -import { translate } from '../../../translate/translate'; -import { secondsToString } from '../../../util/time'; - -const WalletsNativeTxInfoRender = function(txInfo) { - return ( -
    this.handleKeydown(event) }> -
    -
    -
    -
    -
    - -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    amount - { txInfo.amount } -
    fee - { txInfo.fee } -
    confirmations - { txInfo.confirmations } -
    blockhash - { txInfo.blockhash } -
    blockindex - { txInfo.blockindex } -
    blocktime - { secondsToString(txInfo.blocktime) } -
    txid - { txInfo.txid } -
    walletconflicts - { txInfo.walletconflicts.length } -
    time - { secondsToString(txInfo.time) } -
    timereceived - { secondsToString(txInfo.timereceived) } -
    -
    -
    - - - - - - - - - - - -
    vjoinsplit - { txInfo.vjoinsplit } -
    details - { txInfo.details } -
    -
    -
    - -
    -
    - -
    -
    -
    -
    -
    -
    - -
    -
    -
    -
    -
    -
    - ); -}; - -export default WalletsNativeTxInfoRender; \ No newline at end of file diff --git a/react/src/components/dashboard/walletsTxInfo/walletsTxInfo.js b/react/src/components/dashboard/walletsTxInfo/walletsTxInfo.js index 0eac017..03a021b 100644 --- a/react/src/components/dashboard/walletsTxInfo/walletsTxInfo.js +++ b/react/src/components/dashboard/walletsTxInfo/walletsTxInfo.js @@ -28,10 +28,17 @@ class WalletsTxInfo extends React.Component { } } + isNativeMode() { + return this.props.ActiveCoin.mode === 'native'; + } + render() { if (this.props && this.props.ActiveCoin.showTransactionInfo && - this.props.ActiveCoin.mode !== 'native') { + // 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'))) { const txInfo = this.props.ActiveCoin.txhistory[this.props.ActiveCoin.showTransactionInfoTxIndex]; return WalletsTxInfoRender.call(this, txInfo); } diff --git a/react/src/components/dashboard/walletsTxInfo/walletsTxInfo.render.js b/react/src/components/dashboard/walletsTxInfo/walletsTxInfo.render.js index 093aab2..07299a2 100644 --- a/react/src/components/dashboard/walletsTxInfo/walletsTxInfo.render.js +++ b/react/src/components/dashboard/walletsTxInfo/walletsTxInfo.render.js @@ -18,8 +18,25 @@ const WalletsTxInfoRender = function(txInfo) { TxID Info -
  3. - this.openTab(1) }> + + { this.isNativeMode() && +
  4. + this.openTab(1) }> + Vjointsplits, Details + +
  5. + } + + { this.isNativeMode() && +
  6. + this.openTab(2) }> + Hex + +
  7. + } + +
  8. + this.openTab(3) }> Raw info
  9. @@ -71,10 +88,64 @@ const WalletsTxInfoRender = function(txInfo) { { txInfo.txid } + + { this.isNativeMode() && + + walletconflicts + + { txInfo.walletconflicts.length } + + + } + + { this.isNativeMode() && + + time + + { secondsToString(txInfo.time) } + + + } + + { this.isNativeMode() && + + timereceived + + { secondsToString(txInfo.timereceived) } + + + }
+
+ + + + + + + + + + + +
vjoinsplit + { txInfo.vjoinsplit } +
details + { txInfo.details } +
+
+
+ +
+ +