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