More responsive
This commit is contained in:
parent
24571df531
commit
ada3df08dc
|
@ -77,41 +77,39 @@ class TorrentSearchComponent extends Component<any, State> {
|
||||||
table() {
|
table() {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<div class="table-responsive-md">
|
<table style="table-layout: fixed;" class="table table-fixed table-hover table-sm table-striped">
|
||||||
<table class="table table-hover table-sm table-striped">
|
<thead>
|
||||||
<thead>
|
<tr>
|
||||||
|
<th style="width: 50%">Name</th>
|
||||||
|
<th class="text-right">Size</th>
|
||||||
|
<th class="text-right">Seeds</th>
|
||||||
|
<th class="text-right d-none d-md-table-cell">Leeches</th>
|
||||||
|
<th class="text-right d-none d-md-table-cell">Created</th>
|
||||||
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{this.state.results.torrents.map(torrent => (
|
||||||
<tr>
|
<tr>
|
||||||
<th style="width: 50%">Name</th>
|
<td style="word-wrap: break-word;">{torrent.name}</td>
|
||||||
<th class="text-right">Size</th>
|
<td class="text-right text-muted">{humanFileSize(torrent.size_bytes, true)}</td>
|
||||||
<th class="text-right">Seeds</th>
|
<td class="text-right text-success"><div><i class="fas fa-fw fa-arrow-up"></i>{torrent.seeders}</div></td>
|
||||||
<th class="text-right d-none d-md-table-cell">Leeches</th>
|
<td class="text-right text-danger d-none d-md-table-cell"><i class="fas fa-fw fa-arrow-down"></i>{torrent.leechers}</td>
|
||||||
<th class="text-right d-none d-md-table-cell">Created</th>
|
<td class="text-right text-muted d-none d-md-table-cell" title={`Scraped ${moment(torrent.scraped_date * 1000).fromNow()}`}>
|
||||||
<th></th>
|
{moment(torrent.created_unix * 1000).fromNow()}
|
||||||
|
</td>
|
||||||
|
<td class="text-right">
|
||||||
|
<a class="btn btn-sm" href={magnetLink(torrent.infohash)}>
|
||||||
|
<i title="magnet link" class="fas fa-fw fa-magnet"></i>
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-sm d-none d-md-inline" href={`https://gitlab.com/dessalines/torrents.csv/issues/new?issue[assignee_id]=&issue[milestone_id]=&issue[title]=Report%20Torrent%20infohash%20${torrent.infohash}`}>
|
||||||
|
<i title="Report torrent" class="fas fa-fw fa-flag"></i>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
))}
|
||||||
<tbody>
|
</tbody>
|
||||||
{this.state.results.torrents.map(torrent => (
|
</table>
|
||||||
<tr>
|
|
||||||
<td>{torrent.name}</td>
|
|
||||||
<td class="text-right text-muted">{humanFileSize(torrent.size_bytes, true)}</td>
|
|
||||||
<td class="text-right text-success"><div><i class="fas fa-fw fa-arrow-up"></i>{torrent.seeders}</div></td>
|
|
||||||
<td class="text-right text-danger d-none d-md-table-cell"><i class="fas fa-fw fa-arrow-down"></i>{torrent.leechers}</td>
|
|
||||||
<td class="text-right text-muted d-none d-md-table-cell" title={`Scraped ${moment(torrent.scraped_date * 1000).fromNow()}`}>
|
|
||||||
{moment(torrent.created_unix * 1000).fromNow()}
|
|
||||||
</td>
|
|
||||||
<td class="text-right">
|
|
||||||
<a class="btn btn-sm" href={magnetLink(torrent.infohash)}>
|
|
||||||
<i title="magnet link" class="fas fa-fw fa-magnet"></i>
|
|
||||||
</a>
|
|
||||||
<a class="btn btn-sm d-none d-md-inline" href={`https://gitlab.com/dessalines/torrents.csv/issues/new?issue[assignee_id]=&issue[milestone_id]=&issue[title]=Report%20Torrent%20infohash%20${torrent.infohash}`}>
|
|
||||||
<i title="Report torrent" class="fas fa-fw fa-flag"></i>
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
))}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
{this.paginator()}
|
{this.paginator()}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue