Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem: repeat button useless and taking up too much room #642

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 2 additions & 14 deletions src/components/tx/TxHistory/List/TxView.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,17 @@
import React from 'react';
import PropTypes from 'prop-types';
import { TableRow, TableRowColumn } from 'material-ui/Table';
import { IconButton } from 'material-ui';
import CircularProgress from 'material-ui/CircularProgress';
import muiThemeable from 'material-ui/styles/muiThemeable';
import { Account as AddressAvatar } from 'emerald-js-ui';
import { Forward as ArrowRightIcon } from 'emerald-js-ui/lib/icons3';
import { Repeat as RepeatIcon } from 'emerald-js-ui/lib/icons';
import AccountBalance from '../../../accounts/Balance';
import TokenUnits from '../../../../lib/tokenUnits';
import { link, tables } from '../../../../lib/styles';
import classes from './list.scss';
import i18n from '../../../../i18n/i18n';

const styles = {
repeatIcon: {
width: '15px',
height: '15px',
},
tablePadding: {
paddingTop: '15px',
paddingBottom: '15px',
Expand All @@ -27,7 +21,7 @@ const styles = {


export const TxView = (props) => {
const { showFiat, tx, openTx, openAccount, refreshTx, toAccount, fromAccount, numConfirmations, currentBlockHeight, muiTheme } = props;
const { showFiat, tx, openTx, openAccount, toAccount, fromAccount, numConfirmations, currentBlockHeight, muiTheme } = props;
const blockNumber = tx.get('blockNumber');
const confirmationBlockNumber = blockNumber + numConfirmations;
const successColor = muiTheme.palette.primary1Color;
Expand Down Expand Up @@ -78,7 +72,7 @@ export const TxView = (props) => {

return (
<TableRow selectable={false}>
<TableRowColumn style={{ width: 80, paddingLeft: '0', ...styles.tablePadding }}>
<TableRowColumn style={{ width: 100, paddingLeft: '0', ...styles.tablePadding }}>
{txValue && <AccountBalance
fiatStyle={fiatStyle}
symbol="ETC"
Expand Down Expand Up @@ -109,11 +103,6 @@ export const TxView = (props) => {
onAddressClick={() => openAccount(tx.get('to'))}
/>}
</TableRowColumn>
<TableRowColumn style={{...tables.shortStyle, paddingRight: '0', textAlign: 'right', ...styles.tablePadding}}>
<IconButton onClick={ refreshTx } iconStyle={ styles.repeatIcon }>
<RepeatIcon />
</IconButton>
</TableRowColumn>
</TableRow>
);
};
Expand All @@ -126,7 +115,6 @@ TxView.propTypes = {
toAccount: PropTypes.object.isRequired,
fromAccount: PropTypes.object.isRequired,
openTx: PropTypes.func.isRequired,
refreshTx: PropTypes.func.isRequired,
currentBlockHeight: PropTypes.number.isRequired,
numConfirmations: PropTypes.number.isRequired,
};
Expand Down
3 changes: 1 addition & 2 deletions src/components/tx/TxHistory/List/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const TransactionsList = (props: Props) => {
<Table selectable={ false } fixedHeader={ true } style={{background: muiTheme.palette.alternateTextColor}}>
<TableHeader displaySelectAll={ false } adjustForCheckbox={ false }>
<TableRow>
<TableHeaderColumn className={ cx(classes.columnName, classes.amountColumn) } >
<TableHeaderColumn className={ cx(classes.columnName, classes.amountColumn) } style={{width: 100}} >
Amount
</TableHeaderColumn>
<TableHeaderColumn className={classes.columnName} style={{ width: 60 }}>
Expand All @@ -43,7 +43,6 @@ const TransactionsList = (props: Props) => {
<TableHeaderColumn className={classes.columnName} style={{paddingLeft: '5px'}}>From</TableHeaderColumn>
<TableHeaderColumn className={classes.columnArrow}>&nbsp;</TableHeaderColumn>
<TableHeaderColumn className={classes.columnName} style={{paddingLeft: '5px'}}>To</TableHeaderColumn>
<TableHeaderColumn style={{...tables.shortestStyle }}/>
</TableRow>
</TableHeader>
<TableBody displayRowCheckbox={ false }>
Expand Down
2 changes: 1 addition & 1 deletion src/components/tx/TxHistory/List/list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

.amountColumn {
padding-left: 0 !important;
width: 80px;
width: 100px;
}

.columnArrow {
Expand Down