diff --git a/src/FilterLists.Web.V2/src/components/LicenseTag.tsx b/src/FilterLists.Web.V2/src/components/LicenseTag.tsx
index 4f1c1b8f1..ff752dbaa 100644
--- a/src/FilterLists.Web.V2/src/components/LicenseTag.tsx
+++ b/src/FilterLists.Web.V2/src/components/LicenseTag.tsx
@@ -4,15 +4,16 @@ import * as React from 'react';
interface Props {
name: string;
descriptionUrl: string;
- showLabel?: boolean
};
export const LicenseTag = (props: Props) =>
props.name
? <>
- {props.showLabel &&
License:
}
+ License:
-
+
>
: null;
@@ -25,7 +26,8 @@ interface TagContentsProps {
const TagContents = (props: TagContentsProps) =>
props.descriptionUrl
?
+ target="_blank"
+ rel="noopener noreferrer">
{props.name}
: <>
diff --git a/src/FilterLists.Web.V2/src/components/LinkButton.tsx b/src/FilterLists.Web.V2/src/components/LinkButton.tsx
index 49f79c86c..27e8f6841 100644
--- a/src/FilterLists.Web.V2/src/components/LinkButton.tsx
+++ b/src/FilterLists.Web.V2/src/components/LinkButton.tsx
@@ -19,7 +19,8 @@ export const LinkButton = (props: Props) =>
block
style={{ borderLeftColor: "rgb(217, 217, 217)" }} //HACK: override buggy style in antd
icon={props.icon}
- target="_blank" rel="noopener noreferrer" >
+ target="_blank"
+ rel="noopener noreferrer" >
{props.text}
: null;
\ No newline at end of file
diff --git a/src/FilterLists.Web.V2/src/components/ListInfoDrawer.tsx b/src/FilterLists.Web.V2/src/components/ListInfoDrawer.tsx
index 4a7e36c26..b9c175abf 100644
--- a/src/FilterLists.Web.V2/src/components/ListInfoDrawer.tsx
+++ b/src/FilterLists.Web.V2/src/components/ListInfoDrawer.tsx
@@ -51,15 +51,12 @@ export const ListInfoDrawer = (props: RouteComponentProps & Props) => {
tags={props.tags}
showLabel={true} />
+ name={props.license && props.license.name}
+ descriptionUrl={props.license.descriptionUrl} />
-
+
props.publishedDate
? <>
- {props.showLabel && First Published Date:
}
+ First Published Date:
{new Date(props.publishedDate).toDateString()}
>
: null;
\ No newline at end of file
diff --git a/src/FilterLists.Web.V2/src/components/listsTable/ListsTable.tsx b/src/FilterLists.Web.V2/src/components/listsTable/ListsTable.tsx
index c3b6bf2f0..07b5e09c9 100644
--- a/src/FilterLists.Web.V2/src/components/listsTable/ListsTable.tsx
+++ b/src/FilterLists.Web.V2/src/components/listsTable/ListsTable.tsx
@@ -34,14 +34,20 @@ export const ListsTable = (props: RouteComponentProps & Props) => {
rowKey={record => record.id.toString()}
loading={lists.length ? false : true}
size="small"
- pagination={{ size: "small", simple: true, style: { float: "left" }, pageSize: tablePageSize.pageSize }}
+ pagination={{
+ size: "small",
+ simple: true,
+ style: { float: "left" },
+ pageSize: tablePageSize.pageSize
+ }}
scroll={{ x: tablePageSize.isNarrowWindow ? undefined : 1200 }}>
title="Info"
dataIndex={nameof("id")}
className={styles.nogrow}
fixed="left"
- render={(_text: string, record: List) => } />
+ render={(_id: number, list: List) =>
+ } />
title="Name"
dataIndex={nameof("name")}
@@ -50,14 +56,18 @@ export const ListsTable = (props: RouteComponentProps & Props) => {
width={tablePageSize.isNarrowWindow ? undefined : 200}
className={styles.nogrow}
fixed="left"
- render={(text: string) => {text}
} />
+ render={(name: string) =>
+ {name}
} />
{tablePageSize.isNarrowWindow
? null
:
title="Description"
dataIndex={nameof("description")}
className={styles.nogrow}
- render={(_text: string, record: List) => } />}
+ render={(description: string, list: List) =>
+ } />}
{tablePageSize.isNarrowWindow
? null
:
@@ -65,13 +75,14 @@ export const ListsTable = (props: RouteComponentProps & Props) => {
dataIndex={nameof("syntaxId")}
sorter={(a, b) => {
const getSoftwareIds = (l: List) => software.filter((s: Software) => s.syntaxIds.includes(l.syntaxId)).map(s => s.id);
- const aSoftwareIds = getSoftwareIds(a);
- const bSoftwareIds = getSoftwareIds(b);
- return arraySorter(aSoftwareIds, bSoftwareIds, software);
+ return arraySorter(getSoftwareIds(a), getSoftwareIds(b), software);
}}
width={143}
className={styles.nogrow}
- render={(syntaxId: number) => syntaxId ? s.syntaxIds.includes(syntaxId))} /> : null} />}
+ render={(syntaxId: number) =>
+ syntaxId
+ ? s.syntaxIds.includes(syntaxId))} />
+ : null} />}
{tablePageSize.isNarrowWindow
? null
:
@@ -80,7 +91,10 @@ export const ListsTable = (props: RouteComponentProps & Props) => {
sorter={(a, b) => arraySorter(a.languageIds, b.languageIds, languages)}
width={125}
className={styles.nogrow}
- render={(languageIds: number[]) => languageIds ? languageIds.includes(l.id))} /> : null} />}
+ render={(languageIds: number[]) =>
+ languageIds
+ ? languageIds.includes(l.id))} />
+ : null} />}
{tablePageSize.isNarrowWindow
? null
:
@@ -89,7 +103,10 @@ export const ListsTable = (props: RouteComponentProps & Props) => {
sorter={(a, b) => arraySorter(a.tagIds, b.tagIds, tags)}
width={275}
className={styles.nogrow}
- render={(tagIds: number[]) => tagIds ? tagIds.includes(t.id))} /> : null} />}
+ render={(tagIds: number[]) =>
+ tagIds
+ ? tagIds.includes(t.id))} />
+ : null} />}
);
};
\ No newline at end of file
diff --git a/src/FilterLists.Web.V2/src/components/listsTable/arraySorter.ts b/src/FilterLists.Web.V2/src/components/listsTable/arraySorter.ts
index 60dc733a2..e438c34b9 100644
--- a/src/FilterLists.Web.V2/src/components/listsTable/arraySorter.ts
+++ b/src/FilterLists.Web.V2/src/components/listsTable/arraySorter.ts
@@ -7,8 +7,8 @@ export const arraySorter = (a: number[], b: number[], entities: ArraySortableEnt
a && a.length
? b && b.length
? a.length === b.length
- ? entities.filter((e: ArraySortableEntity) => a.indexOf(e.id) > -1).map((e: ArraySortableEntity) => e.name).join().toLowerCase()
- > entities.filter((e: ArraySortableEntity) => b.indexOf(e.id) > -1).map((e: ArraySortableEntity) => e.name).join().toLowerCase()
+ ? entities.filter((e: ArraySortableEntity) => a.includes(e.id)).map((e: ArraySortableEntity) => e.name).join().toLowerCase()
+ > entities.filter((e: ArraySortableEntity) => b.includes(e.id)).map((e: ArraySortableEntity) => e.name).join().toLowerCase()
? 1
: -1
: a.length > b.length
diff --git a/src/FilterLists.Web.V2/src/components/softwareCloud/SoftwareCloud.tsx b/src/FilterLists.Web.V2/src/components/softwareCloud/SoftwareCloud.tsx
index df58c70ec..50090622d 100644
--- a/src/FilterLists.Web.V2/src/components/softwareCloud/SoftwareCloud.tsx
+++ b/src/FilterLists.Web.V2/src/components/softwareCloud/SoftwareCloud.tsx
@@ -15,10 +15,10 @@ export const SoftwareCloud = (props: Props) =>
{props.showLabel && {`Software:`}
}
{props.software.map((s: Software, i: number) =>
s.homeUrl
- ?
+ target="_blank"
+ rel="noopener noreferrer">
: )}