Further improvements to torrent table

This commit is contained in:
Drew DeVault 2018-01-02 17:05:50 -05:00
parent ca73d5f520
commit 8d2edbe6fd

View File

@ -8,6 +8,12 @@ import TorrentProgress from './torrent_progress';
class TorrentTable extends Component { class TorrentTable extends Component {
render() { render() {
const { selection, torrents, dispatch } = this.props; const { selection, torrents, dispatch } = this.props;
const name_style = {
maxWidth: `${window.innerWidth * 0.25}px`,
textOverflow: 'ellipsis',
overflowX: 'hidden',
whiteSpace: 'nowrap'
};
return ( return (
<table className="table torrents"> <table className="table torrents">
<thead> <thead>
@ -25,12 +31,7 @@ class TorrentTable extends Component {
}} }}
/> />
</th> </th>
<th style={{ <th style={nameStyle}>name</th>
maxWidth: `${window.innerWidth * 0.25}px`,
textOverflow: 'ellipsis',
overflowX: 'hidden',
whiteSpace: 'nowrap'
}}>name</th>
<th style={{ minWidth: '75px' }}>up</th> <th style={{ minWidth: '75px' }}>up</th>
<th style={{ minWidth: '75px' }}>down</th> <th style={{ minWidth: '75px' }}>down</th>
<th style={{width: "18rem"}}> <th style={{width: "18rem"}}>
@ -62,7 +63,7 @@ class TorrentTable extends Component {
} }
/> />
</td> </td>
<td> <td style={nameStyle}>
<a <a
href={`/torrents/${t.id}`} href={`/torrents/${t.id}`}
onClick={e => { onClick={e => {