Browse Source

skip walletTxInfo tabs render

all-modes
pbca26 8 years ago
parent
commit
17124c74fd
  1. 217
      react/src/components/dashboard/walletsTxInfo/walletsTxInfo.render.js

217
react/src/components/dashboard/walletsTxInfo/walletsTxInfo.render.js

@ -22,7 +22,7 @@ const WalletsTxInfoRender = function(txInfo) {
</li> </li>
{ this.isNativeMode() && { this.isNativeMode() &&
<li className={ this.state.activeTab === 1 ? 'hide active' : '' }> <li className={ this.state.activeTab === 1 ? 'hide active' : 'hide' }>
<a onClick={ () => this.openTab(1) }> <a onClick={ () => this.openTab(1) }>
<i className="icon md-plus-square"></i>Vjointsplits, Details <i className="icon md-plus-square"></i>Vjointsplits, Details
</a> </a>
@ -30,7 +30,7 @@ const WalletsTxInfoRender = function(txInfo) {
} }
{ this.isNativeMode() && { this.isNativeMode() &&
<li className={ this.state.activeTab === 2 ? 'hide active' : '' }> <li className={ this.state.activeTab === 2 ? 'hide active' : 'hide' }>
<a onClick={ () => this.openTab(2) }> <a onClick={ () => this.openTab(2) }>
<i className="icon wb-briefcase"></i>Hex <i className="icon wb-briefcase"></i>Hex
</a> </a>
@ -45,117 +45,124 @@ const WalletsTxInfoRender = function(txInfo) {
</ul> </ul>
<div className="panel-body"> <div className="panel-body">
<div className="tab-content"> <div className="tab-content">
<div className={ 'tab-pane' + (this.state.activeTab === 0 ? ' active' : '') }> { this.state.activeTab === 0 &&
<table className="table table-striped"> <div className="tab-pane active">
<tbody> <table className="table table-striped">
<tr> <tbody>
<td>{ translate('TX_INFO.ADDRESS') }</td> <tr>
<td> <td>{ translate('TX_INFO.ADDRESS') }</td>
{ this.props.ActiveCoin.mode === 'basilisk' ? this.props.ActiveCoin.activeAddress : txInfo.address } <td>
</td> { this.props.ActiveCoin.mode === 'basilisk' ? this.props.ActiveCoin.activeAddress : txInfo.address }
</tr> </td>
<tr> </tr>
<td>{ translate('TX_INFO.AMOUNT') }</td> <tr>
<td> <td>{ translate('TX_INFO.AMOUNT') }</td>
{ Config.roundValues ? formatValue('round', txInfo.amount, -10) : txInfo.amount } <td>
</td> { Config.roundValues ? formatValue('round', txInfo.amount, -10) : txInfo.amount }
</tr> </td>
<tr> </tr>
<td>{ translate('TX_INFO.CATEGORY') }</td> <tr>
<td> <td>{ translate('TX_INFO.CATEGORY') }</td>
{ txInfo.category || txInfo.type } <td>
</td> { txInfo.category || txInfo.type }
</tr> </td>
<tr> </tr>
<td>{ translate('TX_INFO.CONFIRMATIONS') }</td> <tr>
<td> <td>{ translate('TX_INFO.CONFIRMATIONS') }</td>
{ txInfo.confirmations } <td>
</td> { txInfo.confirmations }
</tr> </td>
<tr> </tr>
<td>blockhash</td> { txInfo.blockhash &&
<td> <tr>
{ txInfo.blockhash } <td>blockhash</td>
</td> <td>
</tr> { txInfo.blockhash }
<tr> </td>
<td>blocktime</td> </tr>
<td> }
{ secondsToString(txInfo.blocktime || txInfo.timestamp) } { (txInfo.blocktime || txInfo.timestamp) &&
</td> <tr>
</tr> <td>blocktime</td>
<tr> <td>
<td>txid</td> { secondsToString(txInfo.blocktime || txInfo.timestamp) }
<td> </td>
{ txInfo.txid } </tr>
</td> }
</tr> <tr>
<td>txid</td>
{ this.isNativeMode() && <td>
{ txInfo.txid }
</td>
</tr>
{ this.isNativeMode() &&
<tr>
<td>walletconflicts</td>
<td>
{ txInfo.walletconflicts.length }
</td>
</tr>
}
{ this.isNativeMode() &&
<tr>
<td>time</td>
<td>
{ secondsToString(txInfo.time) }
</td>
</tr>
}
{ this.isNativeMode() &&
<tr>
<td>timereceived</td>
<td>
{ secondsToString(txInfo.timereceived) }
</td>
</tr>
}
</tbody>
</table>
</div>
}
{ this.state.activeTab === 1 &&
<div className="tab-pane active">
<table className="table table-striped">
<tbody>
<tr> <tr>
<td>walletconflicts</td> <td>vjoinsplit</td>
<td> <td>
{ txInfo.walletconflicts.length } { txInfo.vjoinsplit }
</td> </td>
</tr> </tr>
}
{ this.isNativeMode() &&
<tr> <tr>
<td>time</td> <td>details</td>
<td> <td>
{ secondsToString(txInfo.time) } { txInfo.details }
</td> </td>
</tr> </tr>
} </tbody>
</table>
{ this.isNativeMode() && </div>
<tr> }
<td>timereceived</td> { this.state.activeTab === 2 &&
<td> <div className="tab-pane active">
{ secondsToString(txInfo.timereceived) } <textarea
</td> className="full-width height-170"
</tr> rows="10"
} cols="80"
</tbody> defaultValue={ txInfo.hex }
</table> disabled></textarea>
</div> </div>
}
<div className={ 'tab-pane' + (this.state.activeTab === 1 ? ' active' : '') }> { this.state.activeTab === 3 &&
<table className="table table-striped"> <div className="tab-pane active">
<tbody> <textarea
<tr> className="full-width height-400"
<td>vjoinsplit</td> rows="40"
<td> cols="80"
{ txInfo.vjoinsplit } defaultValue={ JSON.stringify(txInfo, null, '\t') }
</td> disabled></textarea>
</tr> </div>
<tr> }
<td>details</td>
<td>
{ txInfo.details }
</td>
</tr>
</tbody>
</table>
</div>
<div className={ 'tab-pane' + (this.state.activeTab === 2 ? ' active' : '') }>
<textarea
className="full-width height-170"
rows="10"
cols="80"
defaultValue={ txInfo.hex }
disabled></textarea>
</div>
<div className={ 'tab-pane' + (this.state.activeTab === 3 ? ' active' : '') }>
<textarea
className="full-width height-400"
rows="40"
cols="80"
defaultValue={ JSON.stringify(txInfo, null, '\t') }
disabled></textarea>
</div>
</div> </div>
</div> </div>
</div> </div>

Loading…
Cancel
Save