mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-04-24 05:47:22 -04:00
New: (UI) Show Magnet Link in search results if any
This commit is contained in:
parent
cc66cee71c
commit
d897b50f80
5 changed files with 39 additions and 14 deletions
|
@ -75,6 +75,7 @@ import {
|
|||
faListCheck as fasListCheck,
|
||||
faLocationArrow as fasLocationArrow,
|
||||
faLock as fasLock,
|
||||
faMagnet as fasMagnet,
|
||||
faMedkit as fasMedkit,
|
||||
faMinus as fasMinus,
|
||||
faMusic as fasMusic,
|
||||
|
@ -181,6 +182,7 @@ export const INTERACTIVE = fasUser;
|
|||
export const KEYBOARD = farKeyboard;
|
||||
export const LOCK = fasLock;
|
||||
export const LOGOUT = fasSignOutAlt;
|
||||
export const MAGNET = fasMagnet;
|
||||
export const MANAGE = fasListCheck;
|
||||
export const MEDIA_INFO = farFileInvoice;
|
||||
export const MISSING = fasExclamationTriangle;
|
||||
|
|
|
@ -76,6 +76,7 @@ class SearchIndexOverview extends Component {
|
|||
infoUrl,
|
||||
protocol,
|
||||
downloadUrl,
|
||||
magnetUrl,
|
||||
categories,
|
||||
seeders,
|
||||
leechers,
|
||||
|
@ -121,12 +122,15 @@ class SearchIndexOverview extends Component {
|
|||
onPress={this.onGrabPress}
|
||||
/>
|
||||
|
||||
<IconButton
|
||||
className={styles.downloadLink}
|
||||
name={icons.SAVE}
|
||||
title={translate('Save')}
|
||||
to={downloadUrl}
|
||||
/>
|
||||
{
|
||||
downloadUrl || magnetUrl ?
|
||||
<IconButton
|
||||
name={icons.SAVE}
|
||||
title={translate('Save')}
|
||||
to={downloadUrl ?? magnetUrl}
|
||||
/> :
|
||||
null
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div className={styles.indexerRow}>
|
||||
|
@ -188,7 +192,8 @@ SearchIndexOverview.propTypes = {
|
|||
publishDate: PropTypes.string.isRequired,
|
||||
title: PropTypes.string.isRequired,
|
||||
infoUrl: PropTypes.string.isRequired,
|
||||
downloadUrl: PropTypes.string.isRequired,
|
||||
downloadUrl: PropTypes.string,
|
||||
magnetUrl: PropTypes.string,
|
||||
indexerId: PropTypes.number.isRequired,
|
||||
indexer: PropTypes.string.isRequired,
|
||||
size: PropTypes.number.isRequired,
|
||||
|
|
|
@ -195,7 +195,7 @@ class SearchIndexOverviews extends Component {
|
|||
SearchIndexOverviews.propTypes = {
|
||||
items: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
sortKey: PropTypes.string,
|
||||
scrollTop: PropTypes.number.isRequired,
|
||||
scrollTop: PropTypes.number,
|
||||
jumpToCharacter: PropTypes.string,
|
||||
scroller: PropTypes.instanceOf(Element).isRequired,
|
||||
showRelativeDates: PropTypes.bool.isRequired,
|
||||
|
|
|
@ -59,6 +59,7 @@
|
|||
margin: 0 2px;
|
||||
width: 22px;
|
||||
color: var(--textColor);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.externalLinks {
|
||||
|
|
|
@ -91,6 +91,8 @@ class SearchIndexRow extends Component {
|
|||
const {
|
||||
guid,
|
||||
protocol,
|
||||
downloadUrl,
|
||||
magnetUrl,
|
||||
categories,
|
||||
age,
|
||||
ageHours,
|
||||
|
@ -308,12 +310,27 @@ class SearchIndexRow extends Component {
|
|||
onPress={this.onGrabPress}
|
||||
/>
|
||||
|
||||
<IconButton
|
||||
className={styles.downloadLink}
|
||||
name={icons.SAVE}
|
||||
title={translate('Save')}
|
||||
onPress={this.onSavePress}
|
||||
/>
|
||||
{
|
||||
downloadUrl ?
|
||||
<IconButton
|
||||
className={styles.downloadLink}
|
||||
name={icons.SAVE}
|
||||
title={translate('Save')}
|
||||
onPress={this.onSavePress}
|
||||
/> :
|
||||
null
|
||||
}
|
||||
|
||||
{
|
||||
magnetUrl ?
|
||||
<IconButton
|
||||
className={styles.downloadLink}
|
||||
name={icons.MAGNET}
|
||||
title={translate('Open')}
|
||||
to={magnetUrl}
|
||||
/> :
|
||||
null
|
||||
}
|
||||
</VirtualTableRowCell>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue