Changing scrape column to tooltip. Fixes #8"

This commit is contained in:
Dessalines 2018-10-24 11:18:47 -07:00
parent dbe5fa16d3
commit c29f7959ed
3 changed files with 36 additions and 32 deletions

View File

@ -1,5 +1,7 @@
# Torrents.csv # Torrents.csv
<!-- Torrents.csv - An open source, collaborative repository of torrents, with a self-hostable web server. -->
`Torrents.csv` is a collaborative, *vetted* repository of torrents, consisting of a single, searchable `torrents.csv` file. Its initially populated with a January 2017 backup of the pirate bay, and new torrents are periodically added from various torrents sites via a rust script. `Torrents.csv` is a collaborative, *vetted* repository of torrents, consisting of a single, searchable `torrents.csv` file. Its initially populated with a January 2017 backup of the pirate bay, and new torrents are periodically added from various torrents sites via a rust script.
`Torrents.csv` will only store torrents with at least one seeder to keep the file small, and will be periodically purged of non-seeded torrents, and sorted by seeders descending. `Torrents.csv` will only store torrents with at least one seeder to keep the file small, and will be periodically purged of non-seeded torrents, and sorted by seeders descending.

View File

@ -11,9 +11,9 @@
"author": "Dominic Gannaway", "author": "Dominic Gannaway",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"classcat": "^1.1.3",
"inferno": "^6.0.3", "inferno": "^6.0.3",
"moment": "^2.22.2", "moment": "^2.22.2"
"classcat": "^1.1.3"
}, },
"devDependencies": { "devDependencies": {
"fuse-box": "^3.1.3", "fuse-box": "^3.1.3",

View File

@ -76,6 +76,7 @@ class TorrentSearchComponent extends Component<any, State> {
table() { table() {
return ( return (
<div>
<div class="table-responsive-sm"> <div class="table-responsive-sm">
<table class="table table-hover"> <table class="table table-hover">
<thead> <thead>
@ -85,7 +86,6 @@ class TorrentSearchComponent extends Component<any, State> {
<th class="text-right">Seeds</th> <th class="text-right">Seeds</th>
<th class="text-right">Leeches</th> <th class="text-right">Leeches</th>
<th>Created</th> <th>Created</th>
<th>Scraped</th>
<th></th> <th></th>
</tr> </tr>
</thead> </thead>
@ -96,8 +96,9 @@ class TorrentSearchComponent extends Component<any, State> {
<td class="text-right">{humanFileSize(torrent.size_bytes, true)}</td> <td class="text-right">{humanFileSize(torrent.size_bytes, true)}</td>
<td class="text-right">{torrent.seeders}</td> <td class="text-right">{torrent.seeders}</td>
<td class="text-right">{torrent.leechers}</td> <td class="text-right">{torrent.leechers}</td>
<td>{moment(torrent.created_unix * 1000).fromNow()}</td> <td title={`Scraped ${moment(torrent.scraped_date * 1000).fromNow()}`}>
<td>{moment(torrent.scraped_date * 1000).fromNow()}</td> {moment(torrent.created_unix * 1000).fromNow()}
</td>
<td class="text-right"> <td class="text-right">
<a href={magnetLink(torrent.infohash)}> <a href={magnetLink(torrent.infohash)}>
<i class="fas fa-magnet"></i> <i class="fas fa-magnet"></i>
@ -107,6 +108,7 @@ class TorrentSearchComponent extends Component<any, State> {
))} ))}
</tbody> </tbody>
</table> </table>
</div>
{this.paginator()} {this.paginator()}
</div> </div>
); );