New: VIP Expiration column on indexer index

Fixes #456
Fixes #797
This commit is contained in:
Qstick
2023-02-26 19:56:56 -06:00
parent 02ad2379a5
commit 0e82899958
9 changed files with 60 additions and 5 deletions
@@ -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;