Adding a clickable link for the name.
This commit is contained in:
parent
c257c0a574
commit
0a11e177a8
|
@ -124,9 +124,19 @@ export class Search extends Component<any, State> {
|
|||
{this.state.results.torrents.map(torrent => (
|
||||
<tr>
|
||||
{ !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-success"><i class="fas fa-fw fa-arrow-up d-none d-sm-inline mr-1"></i>{torrent.seeders}</td>
|
||||
|
@ -138,7 +148,7 @@ export class Search extends Component<any, State> {
|
|||
</td>
|
||||
<td class="text-right">
|
||||
<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-pos="left">
|
||||
<i class="fas fa-fw fa-magnet"></i>
|
||||
|
|
Loading…
Reference in New Issue