Commit c0ca4874 authored by zeroleak's avatar zeroleak
Browse files

cleanup UtxosTable, hide utxo path

parent 89fe7832
...@@ -19,10 +19,6 @@ th.address { ...@@ -19,10 +19,6 @@ th.address {
width: 100px; width: 100px;
} }
th.path {
width: 60px;
}
th.account { th.account {
width: 70px; width: 70px;
} }
......
...@@ -20,7 +20,7 @@ class UtxoPoolSelector extends React.PureComponent { ...@@ -20,7 +20,7 @@ class UtxoPoolSelector extends React.PureComponent {
} }
computePoolLabel(poolId) { computePoolLabel(poolId) {
return poolId ? poolId : 'no pool' return poolId ? poolId : 'none'
} }
render () { render () {
...@@ -29,7 +29,11 @@ class UtxoPoolSelector extends React.PureComponent { ...@@ -29,7 +29,11 @@ class UtxoPoolSelector extends React.PureComponent {
const activeLabel = this.computePoolLabel(utxo.poolId) const activeLabel = this.computePoolLabel(utxo.poolId)
if (pools.length < 2 && (!this.props.noPool || !utxo.poolId)) { if (pools.length < 2 && (!this.props.noPool || !utxo.poolId)) {
// single choice available // single choice available
return <span>{this.computePoolLabel(utxo.poolId ? utxo.poolId : undefined)}</span> if (!utxo.poolId) {
// no pool
return <span className='text-muted'>-</span>
}
return <span>{activeLabel}</span>
} }
return ( return (
<DropdownButton size='sm' variant="default" title={activeLabel} className='utxoPoolSelector'> <DropdownButton size='sm' variant="default" title={activeLabel} className='utxoPoolSelector'>
......
...@@ -13,6 +13,8 @@ import LinkExternal from '../Utils/LinkExternal'; ...@@ -13,6 +13,8 @@ import LinkExternal from '../Utils/LinkExternal';
import UtxoMixsTargetSelector from './UtxoMixsTargetSelector'; import UtxoMixsTargetSelector from './UtxoMixsTargetSelector';
import UtxoPoolSelector from './UtxoPoolSelector'; import UtxoPoolSelector from './UtxoPoolSelector';
import modalService from '../../services/modalService'; import modalService from '../../services/modalService';
import * as Icons from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
const UtxoControls = React.memo(({ utxo }) => { const UtxoControls = React.memo(({ utxo }) => {
return ( return (
...@@ -89,11 +91,6 @@ const UtxosTable = ({ controls, account, utxos }) => { ...@@ -89,11 +91,6 @@ const UtxosTable = ({ controls, account, utxos }) => {
Address {renderSort('address')} Address {renderSort('address')}
</a> </a>
</th> </th>
<th scope="col" className='path'>
<a onClick={() => handleSetSort('path')}>
Path {renderSort('path')}
</a>
</th>
<th scope="col" className='confirmations'> <th scope="col" className='confirmations'>
<a onClick={() => handleSetSort('confirmations')}> <a onClick={() => handleSetSort('confirmations')}>
Confs {renderSort('confirmations')} Confs {renderSort('confirmations')}
...@@ -154,7 +151,7 @@ const UtxosTable = ({ controls, account, utxos }) => { ...@@ -154,7 +151,7 @@ const UtxosTable = ({ controls, account, utxos }) => {
</td> </td>
<td> <td>
<small> <small>
<span title={utxo.address}> <span title={utxo.address+'\n('+utxo.path+')'}>
<LinkExternal href={utils.linkExplorerAddress(utxo)}> <LinkExternal href={utils.linkExplorerAddress(utxo)}>
{utils.shorten(utxo.address)} {utils.shorten(utxo.address)}
</LinkExternal> </LinkExternal>
...@@ -168,16 +165,12 @@ const UtxosTable = ({ controls, account, utxos }) => { ...@@ -168,16 +165,12 @@ const UtxosTable = ({ controls, account, utxos }) => {
</span> </span>
</small> </small>
</td> </td>
<td> <td className='text-muted'>
<small className='text-muted'>{utxo.path}</small> {utxo.confirmations > 0 ? (
</td> <small title="confirmations">{utxo.confirmations}</small>
<td>
<small>{utxo.confirmations > 0 ? (
<span title="confirmations" className='text-muted'>{utxo.confirmations}</span>
) : ( ) : (
<strong>unconfirmed</strong> <FontAwesomeIcon icon={Icons.faClock} size='xs' title='Unconfirmed'/>
)} )}
</small>
</td> </td>
<td>{utils.toBtc(utxo.value)}</td> <td>{utils.toBtc(utxo.value)}</td>
<td> <td>
......
...@@ -158,6 +158,10 @@ code { ...@@ -158,6 +158,10 @@ code {
padding: 0 0.4em; padding: 0 0.4em;
} }
.table-utxos .dropdown .btn {
padding:0;
}
/* login */ /* login */
.form-signin { .form-signin {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment