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