From b5ad44b5ce297619e25cd16b3d4619c9a228fdf4 Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Sun, 1 Sep 2019 14:47:15 -0500 Subject: [PATCH] add software icons to table --- .../src/components/listsTable/ListsTable.tsx | 6 +++++- .../components/listsTable/ListsTableHoc.tsx | 5 +++-- .../softwareCloud/SoftwareCloud.tsx | 20 ++++++++++++++++++ .../SoftwareIcon.tsx | 0 .../imgs/01-uBlock-Origin.svg | 0 .../imgs/02-Adblock-Plus.svg | 0 .../imgs/03-AdGuard.svg | 0 .../imgs/04-DNS66.png | Bin .../imgs/05-Nano-Adblocker.png | Bin .../imgs/06-AdBlock.png | Bin .../imgs/07-AdAway.png | Bin .../imgs/08-Personal-Blocklist.png | Bin .../imgs/10-Redirector.png | Bin .../imgs/11-Hosts-File-Editor.png | Bin .../imgs/12-Gas-Mask.png | Bin .../imgs/13-MinerBlock.svg | 0 .../imgs/14-Pi-hole.svg | 0 .../imgs/15-uBlock.svg | 0 .../imgs/16-Internet-Explorer-TPL.svg | 0 .../imgs/17-Google-Hit-Hider-by-Domain.png | Bin .../imgs/18-FireHOL.png | Bin .../imgs/19-Samsung-Knox.png | Bin .../imgs/20-Little-Snitch.png | Bin .../imgs/21-Privoxy.png | Bin .../imgs/22-Diversion.png | Bin .../imgs/23-dnsmasq.png | Bin .../imgs/24-Slimjet.png | Bin .../imgs/25-uMatrix.png | Bin .../imgs/26-Blokada.png | Bin .../imgs/27-hostsmgr.png | Bin .../imgs/28-personalDNSfilter.svg | 0 .../imgs/29-Unbound.png | Bin .../imgs/30-BIND.png | Bin .../imgs/31-AdGuard-Home.png | Bin .../imgs/32-AdNauseam.png | Bin .../imgs/33-Legacy-Unix-Derivatives.png | Bin .../imgs/34-Windows-command-line.png | Bin .../imgs/imgs.d.ts | 0 .../imgs/index.ts | 0 .../src/components/softwareCloud/index.ts | 3 +++ .../src/components/softwareIcon/index.ts | 3 --- src/FilterLists.Web.V2/src/hooks/index.ts | 3 ++- .../src/hooks/useSoftware.tsx | 4 ++++ .../src/interfaces/Software.ts | 7 ++++++ 44 files changed, 44 insertions(+), 7 deletions(-) create mode 100644 src/FilterLists.Web.V2/src/components/softwareCloud/SoftwareCloud.tsx rename src/FilterLists.Web.V2/src/components/{softwareIcon => softwareCloud}/SoftwareIcon.tsx (100%) rename src/FilterLists.Web.V2/src/components/{softwareIcon => softwareCloud}/imgs/01-uBlock-Origin.svg (100%) rename src/FilterLists.Web.V2/src/components/{softwareIcon => softwareCloud}/imgs/02-Adblock-Plus.svg (100%) rename src/FilterLists.Web.V2/src/components/{softwareIcon => softwareCloud}/imgs/03-AdGuard.svg (100%) rename src/FilterLists.Web.V2/src/components/{softwareIcon => softwareCloud}/imgs/04-DNS66.png (100%) rename src/FilterLists.Web.V2/src/components/{softwareIcon => softwareCloud}/imgs/05-Nano-Adblocker.png (100%) rename src/FilterLists.Web.V2/src/components/{softwareIcon => softwareCloud}/imgs/06-AdBlock.png (100%) rename src/FilterLists.Web.V2/src/components/{softwareIcon => softwareCloud}/imgs/07-AdAway.png (100%) rename src/FilterLists.Web.V2/src/components/{softwareIcon => softwareCloud}/imgs/08-Personal-Blocklist.png (100%) rename src/FilterLists.Web.V2/src/components/{softwareIcon => softwareCloud}/imgs/10-Redirector.png (100%) rename src/FilterLists.Web.V2/src/components/{softwareIcon => softwareCloud}/imgs/11-Hosts-File-Editor.png (100%) rename src/FilterLists.Web.V2/src/components/{softwareIcon => softwareCloud}/imgs/12-Gas-Mask.png (100%) rename src/FilterLists.Web.V2/src/components/{softwareIcon => softwareCloud}/imgs/13-MinerBlock.svg (100%) rename src/FilterLists.Web.V2/src/components/{softwareIcon => softwareCloud}/imgs/14-Pi-hole.svg (100%) rename src/FilterLists.Web.V2/src/components/{softwareIcon => softwareCloud}/imgs/15-uBlock.svg (100%) rename src/FilterLists.Web.V2/src/components/{softwareIcon => softwareCloud}/imgs/16-Internet-Explorer-TPL.svg (100%) rename src/FilterLists.Web.V2/src/components/{softwareIcon => softwareCloud}/imgs/17-Google-Hit-Hider-by-Domain.png (100%) rename src/FilterLists.Web.V2/src/components/{softwareIcon => softwareCloud}/imgs/18-FireHOL.png (100%) rename src/FilterLists.Web.V2/src/components/{softwareIcon => softwareCloud}/imgs/19-Samsung-Knox.png (100%) rename src/FilterLists.Web.V2/src/components/{softwareIcon => softwareCloud}/imgs/20-Little-Snitch.png (100%) rename src/FilterLists.Web.V2/src/components/{softwareIcon => softwareCloud}/imgs/21-Privoxy.png (100%) rename src/FilterLists.Web.V2/src/components/{softwareIcon => softwareCloud}/imgs/22-Diversion.png (100%) rename src/FilterLists.Web.V2/src/components/{softwareIcon => softwareCloud}/imgs/23-dnsmasq.png (100%) rename src/FilterLists.Web.V2/src/components/{softwareIcon => softwareCloud}/imgs/24-Slimjet.png (100%) rename src/FilterLists.Web.V2/src/components/{softwareIcon => softwareCloud}/imgs/25-uMatrix.png (100%) rename src/FilterLists.Web.V2/src/components/{softwareIcon => softwareCloud}/imgs/26-Blokada.png (100%) rename src/FilterLists.Web.V2/src/components/{softwareIcon => softwareCloud}/imgs/27-hostsmgr.png (100%) rename src/FilterLists.Web.V2/src/components/{softwareIcon => softwareCloud}/imgs/28-personalDNSfilter.svg (100%) rename src/FilterLists.Web.V2/src/components/{softwareIcon => softwareCloud}/imgs/29-Unbound.png (100%) rename src/FilterLists.Web.V2/src/components/{softwareIcon => softwareCloud}/imgs/30-BIND.png (100%) rename src/FilterLists.Web.V2/src/components/{softwareIcon => softwareCloud}/imgs/31-AdGuard-Home.png (100%) rename src/FilterLists.Web.V2/src/components/{softwareIcon => softwareCloud}/imgs/32-AdNauseam.png (100%) rename src/FilterLists.Web.V2/src/components/{softwareIcon => softwareCloud}/imgs/33-Legacy-Unix-Derivatives.png (100%) rename src/FilterLists.Web.V2/src/components/{softwareIcon => softwareCloud}/imgs/34-Windows-command-line.png (100%) rename src/FilterLists.Web.V2/src/components/{softwareIcon => softwareCloud}/imgs/imgs.d.ts (100%) rename src/FilterLists.Web.V2/src/components/{softwareIcon => softwareCloud}/imgs/index.ts (100%) create mode 100644 src/FilterLists.Web.V2/src/components/softwareCloud/index.ts delete mode 100644 src/FilterLists.Web.V2/src/components/softwareIcon/index.ts create mode 100644 src/FilterLists.Web.V2/src/hooks/useSoftware.tsx create mode 100644 src/FilterLists.Web.V2/src/interfaces/Software.ts diff --git a/src/FilterLists.Web.V2/src/components/listsTable/ListsTable.tsx b/src/FilterLists.Web.V2/src/components/listsTable/ListsTable.tsx index 0e2db3d73..94e0dbce9 100644 --- a/src/FilterLists.Web.V2/src/components/listsTable/ListsTable.tsx +++ b/src/FilterLists.Web.V2/src/components/listsTable/ListsTable.tsx @@ -6,11 +6,13 @@ import { useTablePageSizer } from '../../hooks'; import { Language } from '../../interfaces/Language'; import { License } from '../../interfaces/License'; import { List } from '../../interfaces/List'; +import { Software } from '../../interfaces/Software'; import { Tag } from '../../interfaces/Tag'; import { nameof } from '../../utils'; import { Description } from '../Description'; import { LanguageCloud } from '../languageCloud'; import { ListInfoButton } from '../ListInfoButton'; +import { SoftwareCloud } from '../softwareCloud'; import { TagCloud } from '../tagCloud'; import { arraySorter } from './arraySorter'; import styles from './ListsTable.module.css'; @@ -19,6 +21,7 @@ interface Props { lists: List[]; languages: Language[]; licenses: License[]; + software: Software[]; tags: Tag[]; }; @@ -59,8 +62,9 @@ export const ListsTable = (props: RouteComponentProps & Props) => { : title="Software" dataIndex={nameof("syntaxId")} + width={160} className={styles.nogrow} - render={(text: string) =>
{text}
} />} + render={(syntaxId: number) => syntaxId ? s.syntaxIds.includes(syntaxId))} /> : null} />} {tablePageSize.isNarrowWindow ? null : diff --git a/src/FilterLists.Web.V2/src/components/listsTable/ListsTableHoc.tsx b/src/FilterLists.Web.V2/src/components/listsTable/ListsTableHoc.tsx index 690927159..215ffbf8e 100644 --- a/src/FilterLists.Web.V2/src/components/listsTable/ListsTableHoc.tsx +++ b/src/FilterLists.Web.V2/src/components/listsTable/ListsTableHoc.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { RouteComponentProps } from 'react-router-dom'; -import { useLanguages, useLicenses, useLists, useTags } from '../../hooks'; +import { useLanguages, useLicenses, useLists, useSoftware, useTags } from '../../hooks'; import { ListDrawer } from './ListDrawer'; import { ListsTable } from './ListsTable'; @@ -9,10 +9,11 @@ export const ListsTableHoc = (props: RouteComponentProps) => { const lists = useLists(); const languages = useLanguages(); const licenses = useLicenses(); + const software = useSoftware(); const tags = useTags(); return ( <> - + ); diff --git a/src/FilterLists.Web.V2/src/components/softwareCloud/SoftwareCloud.tsx b/src/FilterLists.Web.V2/src/components/softwareCloud/SoftwareCloud.tsx new file mode 100644 index 000000000..f055a8a18 --- /dev/null +++ b/src/FilterLists.Web.V2/src/components/softwareCloud/SoftwareCloud.tsx @@ -0,0 +1,20 @@ +import React from 'react'; + +import { Software } from '../../interfaces/Software'; +import { SoftwareIcon } from './SoftwareIcon'; + +interface Props { + software: Software[]; +}; + +export const SoftwareCloud = (props: Props) => + props.software && props.software.length + ?
+ {props.software.map((s: Software, i: number) => + s.homeUrl + ? + + + : )} +
+ : null; \ No newline at end of file diff --git a/src/FilterLists.Web.V2/src/components/softwareIcon/SoftwareIcon.tsx b/src/FilterLists.Web.V2/src/components/softwareCloud/SoftwareIcon.tsx similarity index 100% rename from src/FilterLists.Web.V2/src/components/softwareIcon/SoftwareIcon.tsx rename to src/FilterLists.Web.V2/src/components/softwareCloud/SoftwareIcon.tsx diff --git a/src/FilterLists.Web.V2/src/components/softwareIcon/imgs/01-uBlock-Origin.svg b/src/FilterLists.Web.V2/src/components/softwareCloud/imgs/01-uBlock-Origin.svg similarity index 100% rename from src/FilterLists.Web.V2/src/components/softwareIcon/imgs/01-uBlock-Origin.svg rename to src/FilterLists.Web.V2/src/components/softwareCloud/imgs/01-uBlock-Origin.svg diff --git a/src/FilterLists.Web.V2/src/components/softwareIcon/imgs/02-Adblock-Plus.svg b/src/FilterLists.Web.V2/src/components/softwareCloud/imgs/02-Adblock-Plus.svg similarity index 100% rename from src/FilterLists.Web.V2/src/components/softwareIcon/imgs/02-Adblock-Plus.svg rename to src/FilterLists.Web.V2/src/components/softwareCloud/imgs/02-Adblock-Plus.svg diff --git a/src/FilterLists.Web.V2/src/components/softwareIcon/imgs/03-AdGuard.svg b/src/FilterLists.Web.V2/src/components/softwareCloud/imgs/03-AdGuard.svg similarity index 100% rename from src/FilterLists.Web.V2/src/components/softwareIcon/imgs/03-AdGuard.svg rename to src/FilterLists.Web.V2/src/components/softwareCloud/imgs/03-AdGuard.svg diff --git a/src/FilterLists.Web.V2/src/components/softwareIcon/imgs/04-DNS66.png b/src/FilterLists.Web.V2/src/components/softwareCloud/imgs/04-DNS66.png similarity index 100% rename from src/FilterLists.Web.V2/src/components/softwareIcon/imgs/04-DNS66.png rename to src/FilterLists.Web.V2/src/components/softwareCloud/imgs/04-DNS66.png diff --git a/src/FilterLists.Web.V2/src/components/softwareIcon/imgs/05-Nano-Adblocker.png b/src/FilterLists.Web.V2/src/components/softwareCloud/imgs/05-Nano-Adblocker.png similarity index 100% rename from src/FilterLists.Web.V2/src/components/softwareIcon/imgs/05-Nano-Adblocker.png rename to src/FilterLists.Web.V2/src/components/softwareCloud/imgs/05-Nano-Adblocker.png diff --git a/src/FilterLists.Web.V2/src/components/softwareIcon/imgs/06-AdBlock.png b/src/FilterLists.Web.V2/src/components/softwareCloud/imgs/06-AdBlock.png similarity index 100% rename from src/FilterLists.Web.V2/src/components/softwareIcon/imgs/06-AdBlock.png rename to src/FilterLists.Web.V2/src/components/softwareCloud/imgs/06-AdBlock.png diff --git a/src/FilterLists.Web.V2/src/components/softwareIcon/imgs/07-AdAway.png b/src/FilterLists.Web.V2/src/components/softwareCloud/imgs/07-AdAway.png similarity index 100% rename from src/FilterLists.Web.V2/src/components/softwareIcon/imgs/07-AdAway.png rename to src/FilterLists.Web.V2/src/components/softwareCloud/imgs/07-AdAway.png diff --git a/src/FilterLists.Web.V2/src/components/softwareIcon/imgs/08-Personal-Blocklist.png b/src/FilterLists.Web.V2/src/components/softwareCloud/imgs/08-Personal-Blocklist.png similarity index 100% rename from src/FilterLists.Web.V2/src/components/softwareIcon/imgs/08-Personal-Blocklist.png rename to src/FilterLists.Web.V2/src/components/softwareCloud/imgs/08-Personal-Blocklist.png diff --git a/src/FilterLists.Web.V2/src/components/softwareIcon/imgs/10-Redirector.png b/src/FilterLists.Web.V2/src/components/softwareCloud/imgs/10-Redirector.png similarity index 100% rename from src/FilterLists.Web.V2/src/components/softwareIcon/imgs/10-Redirector.png rename to src/FilterLists.Web.V2/src/components/softwareCloud/imgs/10-Redirector.png diff --git a/src/FilterLists.Web.V2/src/components/softwareIcon/imgs/11-Hosts-File-Editor.png b/src/FilterLists.Web.V2/src/components/softwareCloud/imgs/11-Hosts-File-Editor.png similarity index 100% rename from src/FilterLists.Web.V2/src/components/softwareIcon/imgs/11-Hosts-File-Editor.png rename to src/FilterLists.Web.V2/src/components/softwareCloud/imgs/11-Hosts-File-Editor.png diff --git a/src/FilterLists.Web.V2/src/components/softwareIcon/imgs/12-Gas-Mask.png b/src/FilterLists.Web.V2/src/components/softwareCloud/imgs/12-Gas-Mask.png similarity index 100% rename from src/FilterLists.Web.V2/src/components/softwareIcon/imgs/12-Gas-Mask.png rename to src/FilterLists.Web.V2/src/components/softwareCloud/imgs/12-Gas-Mask.png diff --git a/src/FilterLists.Web.V2/src/components/softwareIcon/imgs/13-MinerBlock.svg b/src/FilterLists.Web.V2/src/components/softwareCloud/imgs/13-MinerBlock.svg similarity index 100% rename from src/FilterLists.Web.V2/src/components/softwareIcon/imgs/13-MinerBlock.svg rename to src/FilterLists.Web.V2/src/components/softwareCloud/imgs/13-MinerBlock.svg diff --git a/src/FilterLists.Web.V2/src/components/softwareIcon/imgs/14-Pi-hole.svg b/src/FilterLists.Web.V2/src/components/softwareCloud/imgs/14-Pi-hole.svg similarity index 100% rename from src/FilterLists.Web.V2/src/components/softwareIcon/imgs/14-Pi-hole.svg rename to src/FilterLists.Web.V2/src/components/softwareCloud/imgs/14-Pi-hole.svg diff --git a/src/FilterLists.Web.V2/src/components/softwareIcon/imgs/15-uBlock.svg b/src/FilterLists.Web.V2/src/components/softwareCloud/imgs/15-uBlock.svg similarity index 100% rename from src/FilterLists.Web.V2/src/components/softwareIcon/imgs/15-uBlock.svg rename to src/FilterLists.Web.V2/src/components/softwareCloud/imgs/15-uBlock.svg diff --git a/src/FilterLists.Web.V2/src/components/softwareIcon/imgs/16-Internet-Explorer-TPL.svg b/src/FilterLists.Web.V2/src/components/softwareCloud/imgs/16-Internet-Explorer-TPL.svg similarity index 100% rename from src/FilterLists.Web.V2/src/components/softwareIcon/imgs/16-Internet-Explorer-TPL.svg rename to src/FilterLists.Web.V2/src/components/softwareCloud/imgs/16-Internet-Explorer-TPL.svg diff --git a/src/FilterLists.Web.V2/src/components/softwareIcon/imgs/17-Google-Hit-Hider-by-Domain.png b/src/FilterLists.Web.V2/src/components/softwareCloud/imgs/17-Google-Hit-Hider-by-Domain.png similarity index 100% rename from src/FilterLists.Web.V2/src/components/softwareIcon/imgs/17-Google-Hit-Hider-by-Domain.png rename to src/FilterLists.Web.V2/src/components/softwareCloud/imgs/17-Google-Hit-Hider-by-Domain.png diff --git a/src/FilterLists.Web.V2/src/components/softwareIcon/imgs/18-FireHOL.png b/src/FilterLists.Web.V2/src/components/softwareCloud/imgs/18-FireHOL.png similarity index 100% rename from src/FilterLists.Web.V2/src/components/softwareIcon/imgs/18-FireHOL.png rename to src/FilterLists.Web.V2/src/components/softwareCloud/imgs/18-FireHOL.png diff --git a/src/FilterLists.Web.V2/src/components/softwareIcon/imgs/19-Samsung-Knox.png b/src/FilterLists.Web.V2/src/components/softwareCloud/imgs/19-Samsung-Knox.png similarity index 100% rename from src/FilterLists.Web.V2/src/components/softwareIcon/imgs/19-Samsung-Knox.png rename to src/FilterLists.Web.V2/src/components/softwareCloud/imgs/19-Samsung-Knox.png diff --git a/src/FilterLists.Web.V2/src/components/softwareIcon/imgs/20-Little-Snitch.png b/src/FilterLists.Web.V2/src/components/softwareCloud/imgs/20-Little-Snitch.png similarity index 100% rename from src/FilterLists.Web.V2/src/components/softwareIcon/imgs/20-Little-Snitch.png rename to src/FilterLists.Web.V2/src/components/softwareCloud/imgs/20-Little-Snitch.png diff --git a/src/FilterLists.Web.V2/src/components/softwareIcon/imgs/21-Privoxy.png b/src/FilterLists.Web.V2/src/components/softwareCloud/imgs/21-Privoxy.png similarity index 100% rename from src/FilterLists.Web.V2/src/components/softwareIcon/imgs/21-Privoxy.png rename to src/FilterLists.Web.V2/src/components/softwareCloud/imgs/21-Privoxy.png diff --git a/src/FilterLists.Web.V2/src/components/softwareIcon/imgs/22-Diversion.png b/src/FilterLists.Web.V2/src/components/softwareCloud/imgs/22-Diversion.png similarity index 100% rename from src/FilterLists.Web.V2/src/components/softwareIcon/imgs/22-Diversion.png rename to src/FilterLists.Web.V2/src/components/softwareCloud/imgs/22-Diversion.png diff --git a/src/FilterLists.Web.V2/src/components/softwareIcon/imgs/23-dnsmasq.png b/src/FilterLists.Web.V2/src/components/softwareCloud/imgs/23-dnsmasq.png similarity index 100% rename from src/FilterLists.Web.V2/src/components/softwareIcon/imgs/23-dnsmasq.png rename to src/FilterLists.Web.V2/src/components/softwareCloud/imgs/23-dnsmasq.png diff --git a/src/FilterLists.Web.V2/src/components/softwareIcon/imgs/24-Slimjet.png b/src/FilterLists.Web.V2/src/components/softwareCloud/imgs/24-Slimjet.png similarity index 100% rename from src/FilterLists.Web.V2/src/components/softwareIcon/imgs/24-Slimjet.png rename to src/FilterLists.Web.V2/src/components/softwareCloud/imgs/24-Slimjet.png diff --git a/src/FilterLists.Web.V2/src/components/softwareIcon/imgs/25-uMatrix.png b/src/FilterLists.Web.V2/src/components/softwareCloud/imgs/25-uMatrix.png similarity index 100% rename from src/FilterLists.Web.V2/src/components/softwareIcon/imgs/25-uMatrix.png rename to src/FilterLists.Web.V2/src/components/softwareCloud/imgs/25-uMatrix.png diff --git a/src/FilterLists.Web.V2/src/components/softwareIcon/imgs/26-Blokada.png b/src/FilterLists.Web.V2/src/components/softwareCloud/imgs/26-Blokada.png similarity index 100% rename from src/FilterLists.Web.V2/src/components/softwareIcon/imgs/26-Blokada.png rename to src/FilterLists.Web.V2/src/components/softwareCloud/imgs/26-Blokada.png diff --git a/src/FilterLists.Web.V2/src/components/softwareIcon/imgs/27-hostsmgr.png b/src/FilterLists.Web.V2/src/components/softwareCloud/imgs/27-hostsmgr.png similarity index 100% rename from src/FilterLists.Web.V2/src/components/softwareIcon/imgs/27-hostsmgr.png rename to src/FilterLists.Web.V2/src/components/softwareCloud/imgs/27-hostsmgr.png diff --git a/src/FilterLists.Web.V2/src/components/softwareIcon/imgs/28-personalDNSfilter.svg b/src/FilterLists.Web.V2/src/components/softwareCloud/imgs/28-personalDNSfilter.svg similarity index 100% rename from src/FilterLists.Web.V2/src/components/softwareIcon/imgs/28-personalDNSfilter.svg rename to src/FilterLists.Web.V2/src/components/softwareCloud/imgs/28-personalDNSfilter.svg diff --git a/src/FilterLists.Web.V2/src/components/softwareIcon/imgs/29-Unbound.png b/src/FilterLists.Web.V2/src/components/softwareCloud/imgs/29-Unbound.png similarity index 100% rename from src/FilterLists.Web.V2/src/components/softwareIcon/imgs/29-Unbound.png rename to src/FilterLists.Web.V2/src/components/softwareCloud/imgs/29-Unbound.png diff --git a/src/FilterLists.Web.V2/src/components/softwareIcon/imgs/30-BIND.png b/src/FilterLists.Web.V2/src/components/softwareCloud/imgs/30-BIND.png similarity index 100% rename from src/FilterLists.Web.V2/src/components/softwareIcon/imgs/30-BIND.png rename to src/FilterLists.Web.V2/src/components/softwareCloud/imgs/30-BIND.png diff --git a/src/FilterLists.Web.V2/src/components/softwareIcon/imgs/31-AdGuard-Home.png b/src/FilterLists.Web.V2/src/components/softwareCloud/imgs/31-AdGuard-Home.png similarity index 100% rename from src/FilterLists.Web.V2/src/components/softwareIcon/imgs/31-AdGuard-Home.png rename to src/FilterLists.Web.V2/src/components/softwareCloud/imgs/31-AdGuard-Home.png diff --git a/src/FilterLists.Web.V2/src/components/softwareIcon/imgs/32-AdNauseam.png b/src/FilterLists.Web.V2/src/components/softwareCloud/imgs/32-AdNauseam.png similarity index 100% rename from src/FilterLists.Web.V2/src/components/softwareIcon/imgs/32-AdNauseam.png rename to src/FilterLists.Web.V2/src/components/softwareCloud/imgs/32-AdNauseam.png diff --git a/src/FilterLists.Web.V2/src/components/softwareIcon/imgs/33-Legacy-Unix-Derivatives.png b/src/FilterLists.Web.V2/src/components/softwareCloud/imgs/33-Legacy-Unix-Derivatives.png similarity index 100% rename from src/FilterLists.Web.V2/src/components/softwareIcon/imgs/33-Legacy-Unix-Derivatives.png rename to src/FilterLists.Web.V2/src/components/softwareCloud/imgs/33-Legacy-Unix-Derivatives.png diff --git a/src/FilterLists.Web.V2/src/components/softwareIcon/imgs/34-Windows-command-line.png b/src/FilterLists.Web.V2/src/components/softwareCloud/imgs/34-Windows-command-line.png similarity index 100% rename from src/FilterLists.Web.V2/src/components/softwareIcon/imgs/34-Windows-command-line.png rename to src/FilterLists.Web.V2/src/components/softwareCloud/imgs/34-Windows-command-line.png diff --git a/src/FilterLists.Web.V2/src/components/softwareIcon/imgs/imgs.d.ts b/src/FilterLists.Web.V2/src/components/softwareCloud/imgs/imgs.d.ts similarity index 100% rename from src/FilterLists.Web.V2/src/components/softwareIcon/imgs/imgs.d.ts rename to src/FilterLists.Web.V2/src/components/softwareCloud/imgs/imgs.d.ts diff --git a/src/FilterLists.Web.V2/src/components/softwareIcon/imgs/index.ts b/src/FilterLists.Web.V2/src/components/softwareCloud/imgs/index.ts similarity index 100% rename from src/FilterLists.Web.V2/src/components/softwareIcon/imgs/index.ts rename to src/FilterLists.Web.V2/src/components/softwareCloud/imgs/index.ts diff --git a/src/FilterLists.Web.V2/src/components/softwareCloud/index.ts b/src/FilterLists.Web.V2/src/components/softwareCloud/index.ts new file mode 100644 index 000000000..065277b3b --- /dev/null +++ b/src/FilterLists.Web.V2/src/components/softwareCloud/index.ts @@ -0,0 +1,3 @@ +import { SoftwareCloud } from './SoftwareCloud'; + +export { SoftwareCloud }; \ No newline at end of file diff --git a/src/FilterLists.Web.V2/src/components/softwareIcon/index.ts b/src/FilterLists.Web.V2/src/components/softwareIcon/index.ts deleted file mode 100644 index 1947f1089..000000000 --- a/src/FilterLists.Web.V2/src/components/softwareIcon/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { SoftwareIcon } from './SoftwareIcon'; - -export { SoftwareIcon }; \ No newline at end of file diff --git a/src/FilterLists.Web.V2/src/hooks/index.ts b/src/FilterLists.Web.V2/src/hooks/index.ts index b6f83f8e1..019cb850b 100644 --- a/src/FilterLists.Web.V2/src/hooks/index.ts +++ b/src/FilterLists.Web.V2/src/hooks/index.ts @@ -1,7 +1,8 @@ import { useLanguages } from './useLanguages'; import { useLicenses } from './useLicenses'; import { useLists } from './useLists'; +import { useSoftware } from './useSoftware'; import { useTablePageSizer } from './useTablePageSizer'; import { useTags } from './useTags'; -export { useLanguages, useLicenses, useLists, useTablePageSizer, useTags }; \ No newline at end of file +export { useLanguages, useLicenses, useLists, useSoftware, useTablePageSizer, useTags }; \ No newline at end of file diff --git a/src/FilterLists.Web.V2/src/hooks/useSoftware.tsx b/src/FilterLists.Web.V2/src/hooks/useSoftware.tsx new file mode 100644 index 000000000..18507c98f --- /dev/null +++ b/src/FilterLists.Web.V2/src/hooks/useSoftware.tsx @@ -0,0 +1,4 @@ +import { Software } from '../interfaces/Software'; +import { useApiData } from './useApiData'; + +export const useSoftware = () => useApiData("/api/v1/software") || []; \ No newline at end of file diff --git a/src/FilterLists.Web.V2/src/interfaces/Software.ts b/src/FilterLists.Web.V2/src/interfaces/Software.ts new file mode 100644 index 000000000..d65d4fdcc --- /dev/null +++ b/src/FilterLists.Web.V2/src/interfaces/Software.ts @@ -0,0 +1,7 @@ +export interface Software { + id: number; + homeUrl: string; + isAbpSubscribable: boolean; + name: string; + syntaxIds: number[]; +}; \ No newline at end of file