import React, { Component } from 'react'; import { connect } from 'react-redux'; import selectTorrent, { UNION, SUBTRACT, EXCLUSIVE } from '../actions/selection'; import { formatBitrate } from '../bitrate'; import Ratio from './ratio'; import TorrentProgress from './torrent_progress'; const name_style = { maxWidth: `${window.innerWidth * 0.25}px`, textOverflow: 'ellipsis', overflowX: 'hidden', whiteSpace: 'nowrap' }; class TorrentTable extends Component { render() { const { selection, torrents, dispatch } = this.props; return (
{ if (selection.length > 0) { dispatch(selectTorrent([], EXCLUSIVE)); } else { dispatch(selectTorrent(Object.keys(torrents), EXCLUSIVE)); } }} /> | name | up | down | ratio | progress |
---|