Add torrent details panel

This commit is contained in:
John Furrow
2015-11-21 14:31:28 -08:00
parent fd9ee03999
commit ca653c21d8
3 changed files with 57 additions and 24 deletions
@@ -1,7 +1,7 @@
import classNames from 'classnames';
import React from 'react';
import format from '../../helpers/formatData';
import format from '../../util/formatData';
import Icon from '../icons/Icon';
import ProgressBar from './ProgressBar';
@@ -37,6 +37,7 @@ export default class Torrent extends React.Component {
} else if (eta.weeks > 0) {
return (
<span>
<span className="torrent__details--segment">
{eta.weeks}<em className="unit">wk</em>
</span>
@@ -189,7 +190,8 @@ export default class Torrent extends React.Component {
</li>
</ul>
<ProgressBar percent={torrent.percentComplete} />
<button className="torrent__more-info floating-action__button">
<button className="torrent__more-info floating-action__button"
onClick={this.props.handleDetailsClick.bind(this, torrent)}>
<Icon icon="dotsMini" size="mini" />
</button>
</li>
@@ -80,10 +80,15 @@ class TorrentDetails extends React.Component {
}
return (
<table className="torrent-details__table">
<table className="torrent-details__table table">
<thead>
<tr>
<th>Peers {peerCount}</th>
<th>
Peers
<span className="table__heading--sub-heading">
{peerCount}
</span>
</th>
<th>DL</th>
<th>UL</th>
</tr>