mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
@@ -37,10 +37,11 @@
|
||||
flex: 0 0 350px;
|
||||
}
|
||||
|
||||
.added {
|
||||
.added,
|
||||
.vipExpiration {
|
||||
composes: cell;
|
||||
|
||||
flex: 0 0 100px;
|
||||
flex: 0 0 125px;
|
||||
}
|
||||
|
||||
.tags {
|
||||
|
@@ -14,6 +14,7 @@ interface CssExports {
|
||||
'sortName': string;
|
||||
'status': string;
|
||||
'tags': string;
|
||||
'vipExpiration': string;
|
||||
}
|
||||
export const cssExports: CssExports;
|
||||
export default cssExports;
|
||||
|
@@ -54,6 +54,9 @@ function IndexerIndexRow(props: IndexerIndexRowProps) {
|
||||
fields.find((field) => field.name === 'baseUrl')?.value ??
|
||||
(Array.isArray(indexerUrls) ? indexerUrls[0] : undefined);
|
||||
|
||||
const vipExpiration =
|
||||
fields.find((field) => field.name === 'vipExpiration')?.value ?? '';
|
||||
|
||||
const rssUrl = `${window.location.origin}${window.Prowlarr.urlBase}/${id}/api?t=search&extended=1&apikey=${window.Prowlarr.apiKey}`;
|
||||
|
||||
const [isEditIndexerModalOpen, setIsEditIndexerModalOpen] = useState(false);
|
||||
@@ -187,6 +190,17 @@ function IndexerIndexRow(props: IndexerIndexRowProps) {
|
||||
);
|
||||
}
|
||||
|
||||
if (name === 'vipExpiration') {
|
||||
return (
|
||||
<RelativeDateCellConnector
|
||||
key={name}
|
||||
className={styles[name]}
|
||||
date={vipExpiration}
|
||||
component={VirtualTableRowCell}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
if (name === 'tags') {
|
||||
return (
|
||||
<VirtualTableRowCell key={name} className={styles[name]}>
|
||||
|
@@ -30,10 +30,11 @@
|
||||
flex: 0 0 350px;
|
||||
}
|
||||
|
||||
.added {
|
||||
.added,
|
||||
.vipExpiration {
|
||||
composes: headerCell from '~Components/Table/VirtualTableHeaderCell.css';
|
||||
|
||||
flex: 0 0 100px;
|
||||
flex: 0 0 125px;
|
||||
}
|
||||
|
||||
.tags {
|
||||
|
@@ -11,6 +11,7 @@ interface CssExports {
|
||||
'sortName': string;
|
||||
'status': string;
|
||||
'tags': string;
|
||||
'vipExpiration': string;
|
||||
}
|
||||
export const cssExports: CssExports;
|
||||
export default cssExports;
|
||||
|
@@ -60,6 +60,9 @@ function IndexerInfoModalContent(props: IndexerInfoModalContentProps) {
|
||||
fields.find((field) => field.name === 'baseUrl')?.value ??
|
||||
(Array.isArray(indexerUrls) ? indexerUrls[0] : undefined);
|
||||
|
||||
const vipExpiration =
|
||||
fields.find((field) => field.name === 'vipExpiration')?.value ?? undefined;
|
||||
|
||||
const [isEditIndexerModalOpen, setIsEditIndexerModalOpen] = useState(false);
|
||||
const [isDeleteIndexerModalOpen, setIsDeleteIndexerModalOpen] =
|
||||
useState(false);
|
||||
@@ -110,6 +113,13 @@ function IndexerInfoModalContent(props: IndexerInfoModalContentProps) {
|
||||
title={translate('Language')}
|
||||
data={language ?? '-'}
|
||||
/>
|
||||
{vipExpiration ? (
|
||||
<DescriptionListItem
|
||||
descriptionClassName={styles.description}
|
||||
title={translate('VipExpiration')}
|
||||
data={vipExpiration}
|
||||
/>
|
||||
) : null}
|
||||
<DescriptionListItemTitle>
|
||||
{translate('IndexerSite')}
|
||||
</DescriptionListItemTitle>
|
||||
|
@@ -58,10 +58,24 @@ export const filters = [
|
||||
export const filterPredicates = {
|
||||
added: function(item, filterValue, type) {
|
||||
return dateFilterPredicate(item.added, filterValue, type);
|
||||
},
|
||||
|
||||
vipExpiration: function(item, filterValue, type) {
|
||||
const vipExpiration =
|
||||
item.fields.find((field) => field.name === 'vipExpiration')?.value ?? null;
|
||||
|
||||
return dateFilterPredicate(vipExpiration, filterValue, type);
|
||||
}
|
||||
};
|
||||
|
||||
export const sortPredicates = {};
|
||||
export const sortPredicates = {
|
||||
vipExpiration: function(item) {
|
||||
const vipExpiration =
|
||||
item.fields.find((field) => field.name === 'vipExpiration')?.value ?? '';
|
||||
|
||||
return vipExpiration;
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Actions Types
|
||||
|
@@ -78,6 +78,12 @@ export const defaultState = {
|
||||
isSortable: true,
|
||||
isVisible: true
|
||||
},
|
||||
{
|
||||
name: 'vipExpiration',
|
||||
label: translate('VipExpiration'),
|
||||
isSortable: true,
|
||||
isVisible: false
|
||||
},
|
||||
{
|
||||
name: 'capabilities',
|
||||
label: translate('Categories'),
|
||||
@@ -125,6 +131,12 @@ export const defaultState = {
|
||||
type: filterBuilderTypes.DATE,
|
||||
valueType: filterBuilderValueTypes.DATE
|
||||
},
|
||||
{
|
||||
name: 'vipExpiration',
|
||||
label: translate('VipExpiration'),
|
||||
type: filterBuilderTypes.DATE,
|
||||
valueType: filterBuilderValueTypes.DATE
|
||||
},
|
||||
{
|
||||
name: 'priority',
|
||||
label: translate('Priority'),
|
||||
|
@@ -472,6 +472,7 @@
|
||||
"Username": "Username",
|
||||
"Version": "Version",
|
||||
"View": "View",
|
||||
"VipExpiration": "VIP Expiration",
|
||||
"Warn": "Warn",
|
||||
"Website": "Website",
|
||||
"Wiki": "Wiki",
|
||||
|
Reference in New Issue
Block a user