Adding a clickable link for the name.
This commit is contained in:
parent
c257c0a574
commit
0a11e177a8
|
@ -124,11 +124,21 @@ export class Search extends Component<any, State> {
|
||||||
{this.state.results.torrents.map(torrent => (
|
{this.state.results.torrents.map(torrent => (
|
||||||
<tr>
|
<tr>
|
||||||
{ !torrent.name ? (
|
{ !torrent.name ? (
|
||||||
<td class="path_column">{getFileName(torrent.path)}</td>
|
<td className="path_column">
|
||||||
|
<a class="text-body"
|
||||||
|
href={magnetLink(torrent.infohash, torrent.path, torrent.index_)}>
|
||||||
|
{getFileName(torrent.path)}
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
) : (
|
) : (
|
||||||
<td class="search-name-cell">{torrent.name}</td>
|
<td class="search-name-cell">
|
||||||
|
<a class="text-body"
|
||||||
|
href={magnetLink(torrent.infohash, torrent.name, torrent.index_)}>
|
||||||
|
{torrent.name}
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
)}
|
)}
|
||||||
<td class="text-right text-muted">{humanFileSize(torrent.size_bytes, true)}</td>
|
<td class="text-right text-muted">{humanFileSize(torrent.size_bytes, true)}</td>
|
||||||
<td class="text-right text-success"><i class="fas fa-fw fa-arrow-up d-none d-sm-inline mr-1"></i>{torrent.seeders}</td>
|
<td class="text-right text-success"><i class="fas fa-fw fa-arrow-up d-none d-sm-inline mr-1"></i>{torrent.seeders}</td>
|
||||||
<td class="text-right text-danger d-none d-md-table-cell"><i class="fas fa-fw fa-arrow-down mr-1"></i>{torrent.leechers}</td>
|
<td class="text-right text-danger d-none d-md-table-cell"><i class="fas fa-fw fa-arrow-down mr-1"></i>{torrent.leechers}</td>
|
||||||
<td class="text-right text-muted d-none d-md-table-cell"
|
<td class="text-right text-muted d-none d-md-table-cell"
|
||||||
|
@ -138,7 +148,7 @@ export class Search extends Component<any, State> {
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
<a class="btn btn-sm no-outline p-1"
|
<a class="btn btn-sm no-outline p-1"
|
||||||
href={magnetLink(torrent.infohash, torrent.name, torrent.index_)}
|
href={magnetLink(torrent.infohash, (torrent.name) ? torrent.name : torrent.path, torrent.index_)}
|
||||||
data-balloon="Magnet link"
|
data-balloon="Magnet link"
|
||||||
data-balloon-pos="left">
|
data-balloon-pos="left">
|
||||||
<i class="fas fa-fw fa-magnet"></i>
|
<i class="fas fa-fw fa-magnet"></i>
|
||||||
|
|
Loading…
Reference in New Issue