diff --git a/web/.gitignore b/web/.gitignore deleted file mode 100644 index 821ef96d4..000000000 --- a/web/.gitignore +++ /dev/null @@ -1,25 +0,0 @@ -# https://raw.githubusercontent.com/facebook/create-react-app/master/packages/cra-template/template/gitignore - -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.js - -# testing -/coverage - -# production -/build - -# misc -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local - -npm-debug.log* -yarn-debug.log* -yarn-error.log* diff --git a/web/.prettierrc b/web/.prettierrc deleted file mode 100644 index 168d9d2a0..000000000 --- a/web/.prettierrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "endOfLine": "auto" -} diff --git a/web/config-overrides.js b/web/config-overrides.js deleted file mode 100644 index 3f99bbf8e..000000000 --- a/web/config-overrides.js +++ /dev/null @@ -1,30 +0,0 @@ -const { getThemeVariables } = require("antd/dist/theme"); -const { - override, - fixBabelImports, - addLessLoader, - adjustStyleLoaders, -} = require("customize-cra"); - -module.exports = override( - fixBabelImports("import", { - libraryName: "antd", - libraryDirectory: "es", - style: true, - }), - addLessLoader({ - lessOptions: { - javascriptEnabled: true, - modifyVars: { - ...getThemeVariables({ - dark: true, - compact: true, - }), - }, - }, - }), - adjustStyleLoaders(({ use: [, , postcss] }) => { - const postcssOptions = postcss.options; - postcss.options = { postcssOptions }; - }), -); diff --git a/web/package-lock.json b/web/package-lock.json deleted file mode 100644 index 9fdcda7fe..000000000 Binary files a/web/package-lock.json and /dev/null differ diff --git a/web/package.json b/web/package.json deleted file mode 100644 index 9be541c8a..000000000 --- a/web/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "name": "filterlists.web", - "version": "0.1.0", - "private": true, - "dependencies": { - "@testing-library/jest-dom": "^6.6.4", - "@testing-library/react": "^16.3.0", - "@testing-library/user-event": "^14.6.1", - "@types/jest": "^30.0.0", - "@types/node": "^24.1.0", - "@types/react": "^19.1.9", - "@types/react-dom": "^19.1.7", - "@types/react-router-dom": "^5.3.3", - "antd": "^4.24.16", - "babel-plugin-import": "^1.13.8", - "customize-cra": "^1.0.0", - "eslint-config-prettier": "^10.1.8", - "eslint-plugin-prettier": "^5.5.3", - "http-proxy-middleware": "^3.0.5", - "less": "^4.4.0", - "less-loader": "^12.3.0", - "prettier": "^3.3.2", - "react": "^19.1.1", - "react-app-rewired": "^2.1.11", - "react-dom": "^19.1.1", - "react-router-dom": "^5.3.4", - "react-scripts": "^5.0.0", - "slugify": "^1.6.6", - "typescript": "^4.6.4", - "web-vitals": "^3.5.2" - }, - "scripts": { - "start": "react-app-rewired start", - "build": "react-app-rewired build", - "test": "react-app-rewired test", - "eject": "react-scripts eject", - "prettier:check": "prettier --check 'src/**/*.{js,jsx,ts,tsx}'", - "eslint:check": "eslint 'src/**/*.{js,jsx,ts,tsx}'" - }, - "eslintConfig": { - "extends": [ - "react-app", - "react-app/jest", - "plugin:prettier/recommended" - ] - }, - "browserslist": { - "production": [ - ">0.2%", - "not dead", - "not op_mini all" - ], - "development": [ - "last 1 chrome version", - "last 1 firefox version", - "last 1 safari version" - ] - } -} diff --git a/web/public/favicon.ico b/web/public/favicon.ico deleted file mode 100644 index 5e8ce4c63..000000000 Binary files a/web/public/favicon.ico and /dev/null differ diff --git a/web/public/icon_filterlists.png b/web/public/icon_filterlists.png deleted file mode 100644 index 99c15bdde..000000000 Binary files a/web/public/icon_filterlists.png and /dev/null differ diff --git a/web/public/index.html b/web/public/index.html deleted file mode 100644 index ed2cfcc99..000000000 --- a/web/public/index.html +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - FilterLists | Subscriptions for uBlock Origin, Adblock Plus, AdGuard, ... - - - - - -
- - - diff --git a/web/public/logo_filterlists.png b/web/public/logo_filterlists.png deleted file mode 100644 index 5f76494f7..000000000 Binary files a/web/public/logo_filterlists.png and /dev/null differ diff --git a/web/public/manifest.json b/web/public/manifest.json deleted file mode 100644 index 46fd9d722..000000000 --- a/web/public/manifest.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "short_name": "FilterLists", - "name": "FilterLists | Subscriptions for uBlock Origin, Adblock Plus, AdGuard, ...", - "icons": [ - { - "src": "favicon.ico", - "sizes": "64x64 32x32 24x24 16x16", - "type": "image/x-icon" - }, - { - "src": "icon_filterlists.png", - "type": "image/png", - "sizes": "512x512" - } - ], - "start_url": ".", - "display": "standalone", - "theme_color": "#000000", - "background_color": "#ffffff" -} diff --git a/web/public/robots.txt b/web/public/robots.txt deleted file mode 100644 index e9e57dc4d..000000000 --- a/web/public/robots.txt +++ /dev/null @@ -1,3 +0,0 @@ -# https://www.robotstxt.org/robotstxt.html -User-agent: * -Disallow: diff --git a/web/public/tpl-redirect.js b/web/public/tpl-redirect.js deleted file mode 100644 index 6bc7b8c90..000000000 --- a/web/public/tpl-redirect.js +++ /dev/null @@ -1,3 +0,0 @@ -if (window.navigator.msPointerEnabled) { - window.location = "https://filterlists.com/tpl.html"; -} diff --git a/web/public/tpl.html b/web/public/tpl.html deleted file mode 100644 index aa0f419dc..000000000 --- a/web/public/tpl.html +++ /dev/null @@ -1,579 +0,0 @@ - - - - FilterLists.com for Internet Explorer - - - Because FilterLists.com cannot be loaded in Internet Explorer, here's a - workaround to assist in subscribing to TPL lists.

- - In some circumstances, the link will be blocked the first time around. If - so, click on "Allow Blocked Content" in the resulting prompt below, and then - click the link again.

- - -------------------------------------------------------

- - * International lists:

- EasyList - - - View ruleset
- EasyList Without Element Hiding Rules - - - View ruleset
- EasyList Without Rules for Adult Sites - - - View ruleset
- EasyPrivacy - - - View ruleset
- EasyPrivacy Without International Rules - - - View ruleset
- EasyList + EasyPrivacy - - - View ruleset
- Adware Filters - - - View ruleset
- EasyTest - - - View ruleset
- Acceptable Ads - - - View ruleset
- Adblock Warning Removal List - - - View ruleset
- ABP Anti-Circumvention Filter List - - - View ruleset
- Fanboy's Annoyance List - - - View ruleset
- EasyList Cookie List - - - View ruleset
- Fanboy's Social Blocking List - - - View ruleset
- Fanboy's Notifications Blocking List - - - View ruleset
- DNS-BH Malware Domains - - - View ruleset
- Peter Lowe's List - - View ruleset
- Dandelion Sprout's Anti-Malware List - - - View ruleset

- - * Language-specific lists:

- - ABPindo + EasyList - - - View ruleset
- ABPVN + EasyList - - - View ruleset
- Bulgarian List + EasyList - - - View ruleset
- IndianList + EasyList - - - View ruleset
- IndianList - - - View ruleset
- KoreanList + EasyList - - - View ruleset
- KoreanList - - - View ruleset
- EasyList China + EasyList - - - View ruleset
- EasyList China - - - View ruleset
- EasyList Czech and Slovak + EasyList - - - View ruleset
- EasyList Dutch + EasyList - - - View ruleset
- EasyList Dutch - - - View ruleset
- EasyList Germany + EasyList - - - View ruleset
- EasyList Germany - - - View ruleset
- EasyList Italy + EasyList - - - View ruleset
- EasyList Italy - - - View ruleset
- EasyList Lithuania + EasyList - - - View ruleset
- EasyList Spanish + EasyList - - - View ruleset
- EasyList Spanish - - - View ruleset
- EasyList Polish + EasyList - - - View ruleset
- EasyList Polish - - - View ruleset
- EasyList Portuguese + EasyList - - - View ruleset
- EasyList Portuguese - - - View ruleset
- EasyList Hebrew - - - View ruleset
- Latvian List + EasyList - - - View ruleset
- Liste AR + Liste FR + EasyList - - - View ruleset
- Liste AR - - - View ruleset
- Liste FR + EasyList - - - View ruleset
- Liste FR - - - View ruleset
- ROList + EasyList - - - View ruleset
- RU AdList + EasyList - - - View ruleset
- RU AdList - - - View ruleset
- RU AdList: BitBlock + Fanboy's Annoyance List - - - View ruleset
- RU AdList: BitBlock - - - View ruleset
- RU AdList: Counters - - - View ruleset
- RU AntiPron List - - - View ruleset
- Dandelion Sprouts nordiske filtre - - - View ruleset

- - -------------------------------------------------------

- - * Outdated international lists (Last updated more than 24 months ago), that - have not been succeeded by more recently updated TPL lists

- - (2016) - Fanboy's Enhanced Tracking List - - - View ruleset
- (2016) - Malware Patrol - - View ruleset
- (2016) - Rickroll Blacklist - - View ruleset
- (2013) - M - - View ruleset
- (2013) - Adversity - - View ruleset
- (2013) - Adversity - AntiSocial - - View ruleset
- (2013) - Stop Google Tracking - - - View ruleset
- (2011) - Popup Block List for Adblock Plus Popup Addon - - View ruleset
- (2011) - Facebook Connect Opt-Out - - - View ruleset
- (Unknown year) - TRUSTe Easy Tracking Protection List - - - View ruleset

- - * Outdated language-specific lists (Last updated more than 24 months ago), - that have not been succeeded by more recently updated TPL lists

- - (2016) - Adblock Persian List - - View ruleset
- (2015) - Wiltteri - - - View ruleset
- (2015) - Wiltteri + EasyList - - - View ruleset
- (2015) - Wiltteri Reborn - - - View ruleset - - diff --git a/web/src/App.test.tsx b/web/src/App.test.tsx deleted file mode 100644 index de42c8059..000000000 --- a/web/src/App.test.tsx +++ /dev/null @@ -1,8 +0,0 @@ -import { render, screen } from "@testing-library/react"; -import { App } from "./App"; - -xtest("renders learn react link", () => { - render(); - const linkElement = screen.getByText(/learn react/i); - expect(linkElement).toBeInTheDocument(); -}); diff --git a/web/src/App.tsx b/web/src/App.tsx deleted file mode 100644 index 0941a61dd..000000000 --- a/web/src/App.tsx +++ /dev/null @@ -1,150 +0,0 @@ -import { - ApiOutlined, - DollarOutlined, - GithubOutlined, - IeOutlined, - TwitterOutlined, -} from "@ant-design/icons"; -import { Layout, Tag } from "antd"; -import { - BrowserRouter as Router, - Link, - Route, - RouteComponentProps, - Switch, -} from "react-router-dom"; -import { ListsTable } from "./components"; - -const { Header, Content, Footer } = Layout; - -export const App: React.FC = () => ( - - -
- -
- -
- - - - - -
-
-
- - - - - - -
-
-
-); - -const Logo = () => ( - - FilterLists logo - -); - -const NotFound = (props: RouteComponentProps) => ( -

- 404 Not Found: {props.location.pathname} -

-); - -const CopyrightAuthor = () => ( - - ©{new Date().getFullYear()}  - - Collin M. Barrett - - -); - -const Twitter = () => ( - - - Twitter - - -); - -const GitHub = () => ( - - - GitHub - - -); - -const Api = () => ( - - - API - - -); - -const Tpl = () => ( - - - TPL (IE) - - -); - -const Donate = () => ( - - - Donate - - -); diff --git a/web/src/components/Description.tsx b/web/src/components/Description.tsx deleted file mode 100644 index f5196c755..000000000 --- a/web/src/components/Description.tsx +++ /dev/null @@ -1,5 +0,0 @@ -interface Props { - description?: string; -} - -export const Description = (props: Props) =>

{props.description}

; diff --git a/web/src/components/LicenseTag.tsx b/web/src/components/LicenseTag.tsx deleted file mode 100644 index 8ad676db7..000000000 --- a/web/src/components/LicenseTag.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import { Tag } from "antd"; - -interface Props { - name: string; - url?: string; - showLabel?: boolean; -} - -export const LicenseTag = (props: Props) => - props.name ? ( - - {props.showLabel &&

License:

} - - - -
- ) : null; - -const TagContents = (props: Props) => - props.url ? ( - - {props.name} - - ) : ( - <>{props.name} - ); diff --git a/web/src/components/LinkButton.tsx b/web/src/components/LinkButton.tsx deleted file mode 100644 index 9d4b22df8..000000000 --- a/web/src/components/LinkButton.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import { Button } from "antd"; -import { ButtonType } from "antd/lib/button"; - -interface Props { - url?: string; - text: string; - title?: string; - type?: ButtonType; - icon?: React.ReactNode; -} - -export const LinkButton = (props: Props) => - props.url && props.text ? ( - - ) : null; diff --git a/web/src/components/ListInfoButton.tsx b/web/src/components/ListInfoButton.tsx deleted file mode 100644 index b4434d61f..000000000 --- a/web/src/components/ListInfoButton.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import { InfoCircleOutlined } from "@ant-design/icons"; -import { Button } from "antd"; -import { RouteComponentProps } from "react-router-dom"; -import slugify from "slugify"; -import { SlugifyOptions } from "../constants"; - -interface Props { - listName: string; -} - -export const ListInfoButton = (props: RouteComponentProps & Props) => { - const listPath = `/lists/${slugify(props.listName, SlugifyOptions)}`; - return ( - - ); -}; diff --git a/web/src/components/SubscribeButtons.tsx b/web/src/components/SubscribeButtons.tsx deleted file mode 100644 index 31a544a5b..000000000 --- a/web/src/components/SubscribeButtons.tsx +++ /dev/null @@ -1,126 +0,0 @@ -import { ImportOutlined } from "@ant-design/icons"; -import { Button } from "antd"; -import { ButtonType } from "antd/lib/button"; - -interface Props { - name: string; - viewUrls: string[]; -} - -export const SubscribeButtons = (props: Props) => - props.viewUrls.length ? ( - <> - - - - ) : null; - -interface MirrorButtonsProps { - name: string; - viewUrlMirrors: string[] | undefined; -} - -const MirrorButtons = (props: MirrorButtonsProps) => ( - <> - {props.viewUrlMirrors && props.viewUrlMirrors.length - ? props.viewUrlMirrors.map((viewUrlMirror: string, i: number) => ( - - )) - : null} - -); - -interface SubscribeButtonProps { - name: string; - viewUrl: string; - text: string; - isPrimary: boolean; -} - -const SubscribeButton = (props: SubscribeButtonProps) => { - const buttonProps = buildButtonProps( - props.name, - props.viewUrl, - props.isPrimary, - ); - return ( - - ); -}; - -const buildButtonProps = ( - name: string, - viewUrl: string, - isPrimary: boolean, -) => { - let type: ButtonType = isPrimary ? "primary" : "default"; - let hidden: boolean = false; - - const hrefLocation = `${encodeURIComponent(viewUrl)}`; - const hrefTitle = `${encodeURIComponent(name)}`; - let href = `abp:subscribe?location=${hrefLocation}&title=${hrefTitle}`; - - let prefixes: string[] = []; - let message = `Subscribe to ${name} with a browser extension supporting the "abp:" protocol (e.g. uBlock Origin, Adblock Plus).`; - - // HTTP protocols - if (viewUrl.includes(".onion/")) { - type = "dashed"; - prefixes.push("TOR"); - } - if (viewUrl.includes("http://")) { - type = "dashed"; - prefixes.push("INSECURE"); - } - - // Software protocols - if (viewUrl.includes(".tpl")) { - href = `https://filterlists.com/tpl.html`; - message = `Subscribe via FilterList's TPL page.`; - } - if ( - viewUrl.includes(".lsrules") || - viewUrl.includes("?hostformat=littlesnitch") - ) { - href = `x-littlesnitch:subscribe-rules?url=${hrefLocation}`; - message = `Subscribe to ${name} with Little Snitch's rule group subscription feature.`; - } - - // Formats - if ( - viewUrl.includes(".zip") || - viewUrl.includes(".7z") || - viewUrl.includes(".tar.gz") - ) { - hidden = true; // no known software supports subscribing to compressed lists - } - - const title = `${ - prefixes.length ? prefixes.join(" | ") + " | " : "" - }${message}`; - - return { disabled: hidden, type, href, title }; -}; diff --git a/web/src/components/SyntaxTag.tsx b/web/src/components/SyntaxTag.tsx deleted file mode 100644 index 8ce321cef..000000000 --- a/web/src/components/SyntaxTag.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import { Tag } from "antd"; - -interface Props { - name: string; - definitionUrl?: string; - showLabel?: boolean; -} - -export const SyntaxTag = (props: Props) => - props.name ? ( - - {props.showLabel &&

Syntax:

} - - - -
- ) : null; - -const TagContents = (props: Props) => - props.definitionUrl ? ( - - {props.name} - - ) : ( - <>{props.name} - ); diff --git a/web/src/components/ViewButtons.tsx b/web/src/components/ViewButtons.tsx deleted file mode 100644 index df7fbb6ad..000000000 --- a/web/src/components/ViewButtons.tsx +++ /dev/null @@ -1,55 +0,0 @@ -import { LinkButton } from "./LinkButton"; -import { SearchOutlined } from "@ant-design/icons"; - -interface Props { - name: string; - viewUrls: string[]; -} - -export const ViewButtons = (props: Props) => - props.viewUrls.length ? ( - <> - - - - ) : null; - -interface MirrorButtonsProps { - name: string; - viewUrlMirrors: string[] | undefined; -} - -const MirrorButtons = (props: MirrorButtonsProps) => ( - <> - {props.viewUrlMirrors && props.viewUrlMirrors.length - ? props.viewUrlMirrors.map((viewUrlMirror: string, i: number) => ( - - )) - : null} - -); - -interface ViewButtonProps { - name: string; - viewUrl: string; - text: string; -} - -const ViewButton = (props: ViewButtonProps) => { - return ( - } - /> - ); -}; diff --git a/web/src/components/index.ts b/web/src/components/index.ts deleted file mode 100644 index 059e95e97..000000000 --- a/web/src/components/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { ListsTable } from "./listsTable"; - -export { ListsTable }; diff --git a/web/src/components/languageCloud/LanguageCloud.tsx b/web/src/components/languageCloud/LanguageCloud.tsx deleted file mode 100644 index 674d2f9ad..000000000 --- a/web/src/components/languageCloud/LanguageCloud.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { Tag } from "antd"; -import { Language } from "../../interfaces/Language"; - -interface Props { - languages: Language[]; - showLabel?: boolean; -} - -export const LanguageCloud = (props: Props) => - props.languages && props.languages.length ? ( -
- {props.showLabel && ( -

{`Language${props.languages.length > 1 ? "s" : ""}:`}

- )} - {props.languages.map((l: Language, i: number) => ( - - {l.iso6391} - - ))} -
- ) : null; diff --git a/web/src/components/languageCloud/index.ts b/web/src/components/languageCloud/index.ts deleted file mode 100644 index c0509230a..000000000 --- a/web/src/components/languageCloud/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { LanguageCloud } from "./LanguageCloud"; - -export { LanguageCloud }; diff --git a/web/src/components/listInfoDrawer/ListInfoDrawer.tsx b/web/src/components/listInfoDrawer/ListInfoDrawer.tsx deleted file mode 100644 index 71ea3e717..000000000 --- a/web/src/components/listInfoDrawer/ListInfoDrawer.tsx +++ /dev/null @@ -1,165 +0,0 @@ -import "./listInfoDrawer.css"; -import { Divider, Drawer } from "antd"; -import { - DollarOutlined, - FileExclamationOutlined, - FormOutlined, - GithubOutlined, - GlobalOutlined, - HomeOutlined, - MailOutlined, - MessageOutlined, - TeamOutlined, -} from "@ant-design/icons"; -import { useEffect, useState } from "react"; -import ButtonGroup from "antd/lib/button/button-group"; -import { Description } from "../Description"; -import { LanguageCloud } from "../languageCloud"; -import { LicenseTag } from "../LicenseTag"; -import { LinkButton } from "../LinkButton"; -import { ViewButtons } from "../ViewButtons"; -import { Maintainers } from "../maintainers"; -import { RouteComponentProps } from "react-router-dom"; -import { SoftwareCloud } from "../softwareCloud"; -import { SubscribeButtons } from "../SubscribeButtons"; -import { TagCloud } from "../tagCloud"; -import { useListDetails } from "../../hooks"; -import { SyntaxCloud } from "../syntaxCloud"; -import { Tag } from "../../interfaces/Tag"; -import { License } from "../../interfaces/License"; -import { Maintainer } from "../../interfaces/Maintainer"; -import { Software } from "../../interfaces/Software"; -import { Syntax } from "../../interfaces/Syntax"; -import { Language } from "../../interfaces/Language"; - -interface Props { - listId: number; - languages: Language[]; - licenses: License[]; - maintainers: Maintainer[]; - software: Software[]; - syntaxes: Syntax[]; - tags: Tag[]; -} - -export const ListInfoDrawer = (props: RouteComponentProps & Props) => { - const list = useListDetails(props.listId); - - const listLanguage = props.languages.filter((l) => - list?.languageIds.includes(l.id), - ); - const listTags = props.tags.filter((t) => list?.tagIds.includes(t.id)); - const listLicense = props.licenses.find((l) => l.id === list?.licenseId); - const listSyntaxes = props.syntaxes.filter((s) => - list?.syntaxIds.includes(s.id), - ); - const listSoftware = props.software.filter((s) => - s.syntaxIds.some((sid) => list?.syntaxIds.includes(sid)), - ); - const listMaintainers = props.maintainers.filter((m) => - list?.maintainerIds.includes(m.id), - ); - - const [originalTitle] = useState(document.title); - const listName = list?.name; - useEffect(() => { - const updateTitle = () => - (document.title = list?.name + " | " + originalTitle); - updateTitle(); - return () => { - document.title = originalTitle; - }; - }, [list, originalTitle, listName]); - const viewUrlModels = list?.viewUrls.filter((u) => u.segmentNumber === 1); - const viewUrls = viewUrlModels == null ? [] : viewUrlModels.map((u) => u.url); - return list ? ( - props.history.push("/")} - > - - - - {listLicense && ( - - )} - {listSyntaxes && } - - - - - {viewUrls.length && ( - - )} - {viewUrls.length && ( - - )} - } - /> - } - /> - } - /> - {list.emailAddress && ( - } - /> - )} - } - /> - } - /> - } - /> - } - /> - } - /> - - - ) : null; -}; diff --git a/web/src/components/listInfoDrawer/index.ts b/web/src/components/listInfoDrawer/index.ts deleted file mode 100644 index 03a1cedaf..000000000 --- a/web/src/components/listInfoDrawer/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { ListInfoDrawer } from "./ListInfoDrawer"; - -export { ListInfoDrawer }; diff --git a/web/src/components/listInfoDrawer/listInfoDrawer.css b/web/src/components/listInfoDrawer/listInfoDrawer.css deleted file mode 100644 index 835c877b0..000000000 --- a/web/src/components/listInfoDrawer/listInfoDrawer.css +++ /dev/null @@ -1,10 +0,0 @@ -h3 { - margin-top: 1em; - margin-bottom: 0.2em; -} - -.ant-btn-group - .ant-btn-primary - + .ant-btn:not(.ant-btn-primary):not([disabled]) { - border-left-color: rgb(67, 67, 67); -} diff --git a/web/src/components/listsTable/ListDrawer.tsx b/web/src/components/listsTable/ListDrawer.tsx deleted file mode 100644 index 4b209c83b..000000000 --- a/web/src/components/listsTable/ListDrawer.tsx +++ /dev/null @@ -1,45 +0,0 @@ -import { - Redirect, - Route, - RouteComponentProps, - StaticContext, -} from "react-router"; -import { List } from "../../interfaces/List"; -import { ListInfoDrawer } from "../listInfoDrawer"; -import { Language } from "../../interfaces/Language"; -import { License } from "../../interfaces/License"; -import { Maintainer } from "../../interfaces/Maintainer"; -import { Software } from "../../interfaces/Software"; -import { Syntax } from "../../interfaces/Syntax"; -import { Tag } from "../../interfaces/Tag"; - -interface Props { - lists: List[]; - languages: Language[]; - licenses: License[]; - maintainers: Maintainer[]; - software: Software[]; - syntaxes: Syntax[]; - tags: Tag[]; -} - -export const ListDrawer = (props: Props) => { - const renderDrawer = (rp: RouteComponentProps) => { - const list = props.lists.find((l) => l.slug === rp.match.params.listSlug); - return list ? ( - - ) : props.lists && props.lists.length ? ( - - ) : null; - }; - return ; -}; diff --git a/web/src/components/listsTable/ListsTable.tsx b/web/src/components/listsTable/ListsTable.tsx deleted file mode 100644 index 69b747d0f..000000000 --- a/web/src/components/listsTable/ListsTable.tsx +++ /dev/null @@ -1,382 +0,0 @@ -import { - Key, - SorterResult, - TableCurrentDataSource, -} from "antd/lib/table/interface"; -import { useEffect, useState } from "react"; -import { SoftwareCloud, SoftwareIcon } from "../softwareCloud"; -import { Table, Tag } from "antd"; -import { useSearchColumnFilter, useTablePageSizer } from "../../hooks"; -import { Description } from "../Description"; -import { Language } from "../../interfaces/Language"; -import { LanguageCloud } from "../languageCloud"; -import { SyntaxCloud } from "../syntaxCloud"; -import { License } from "../../interfaces/License"; -import { LicenseTag } from "../LicenseTag"; -import { List } from "../../interfaces/List"; -import { ListInfoButton } from "../ListInfoButton"; -import { Maintainer } from "../../interfaces/Maintainer"; -import { MaintainerCloud } from "../maintainerCloud"; -import { RouteComponentProps } from "react-router"; -import { Software } from "../../interfaces/Software"; -import { Syntax } from "../../interfaces/Syntax"; -import { TagCloud } from "../tagCloud"; -import { Tag as TagInterface } from "../../interfaces/Tag"; -import { arraySorter } from "./arraySorter"; -import { nameof } from "../../utils"; -import { TablePaginationConfig } from "antd/lib/table"; -import { SyntaxTag } from "../SyntaxTag"; - -interface Props { - lists: List[]; - languages: Language[]; - licenses: License[]; - maintainers: Maintainer[]; - software: Software[]; - syntaxes: Syntax[]; - tags: TagInterface[]; -} - -export const ListsTable = (props: RouteComponentProps & Props) => { - const { - lists, - languages, - licenses, - maintainers, - software, - syntaxes, - tags, - ...routeComponentProps - } = props; - const tablePageSize = useTablePageSizer(); - const searchNameColumn = useSearchColumnFilter(nameof("name")); - const searchDescriptionColumn = useSearchColumnFilter( - nameof("description"), - ); - const [visibleLists, setVisibleLists] = useState(lists); - useEffect(() => { - setVisibleLists(lists); - }, [lists]); - return ( - - dataSource={lists} - rowKey={(record) => record.id.toString()} - loading={lists.length ? false : true} - size="small" - pagination={{ - simple: true, - pageSize: tablePageSize.pageSize, - position: ["topRight"], - }} - scroll={{ - x: - tablePageSize.isNarrowWindow || tablePageSize.isWideWindow - ? undefined - : 1892, - }} - onChange={( - _pagination: TablePaginationConfig, - _filters: Record, - _sorter: SorterResult | SorterResult[], - extra: TableCurrentDataSource, - ) => setVisibleLists(extra.currentDataSource)} - > - - title="Info" - key="Info" - dataIndex={nameof("id")} - width={62} - fixed={tablePageSize.isNarrowWindow ? undefined : "left"} - render={(_id: number, list: List) => ( - - )} - /> - - title="Name" - key="Name" - dataIndex={nameof("name")} - sorter={(a, b) => a.name.localeCompare(b.name)} - defaultSortOrder={"ascend"} - width={tablePageSize.isNarrowWindow ? undefined : 200} - fixed={tablePageSize.isNarrowWindow ? undefined : "left"} - filterDropdown={searchNameColumn.filterDropdown} - filterIcon={searchNameColumn.filterIcon} - onFilter={searchNameColumn.onFilter} - render={(name: string) =>
{name}
} - /> - {tablePageSize.isNarrowWindow ? null : ( - - title="Description" - key="Description" - dataIndex={nameof("description")} - sorter={(a, b) => - a.description - ? b.description - ? a.description.localeCompare(b.description) - : -1 - : 1 - } - width={ - !tablePageSize.isNarrowWindow && !tablePageSize.isWideWindow - ? 423 - : undefined - } - filterDropdown={searchDescriptionColumn.filterDropdown} - filterIcon={searchDescriptionColumn.filterIcon} - onFilter={searchDescriptionColumn.onFilter} - render={(description: string) => ( - - )} - /> - )} - {tablePageSize.isNarrowWindow ? null : ( - - title="Software" - key="Software" - dataIndex={nameof("syntaxIds")} - sorter={(a, b) => { - const getSoftwareIds = (l: List) => - software - .filter( - (s: Software) => - s.syntaxIds && - s.syntaxIds.some((i) => l.syntaxIds.includes(i)), - ) - .map((s) => s.id); - return arraySorter(getSoftwareIds(a), getSoftwareIds(b), software); - }} - width={170} - filters={software.map((s) => ({ - text: ( - <> - -   - {s.name}  ( - { - visibleLists.filter( - (l) => - s.syntaxIds && - s.syntaxIds.some((i) => l.syntaxIds.includes(i)), - ).length - } - ) - - ), - value: s.name, - }))} - onFilter={(value, record) => - software - .filter((s: Software) => s.name === value) - .flatMap((s) => s.syntaxIds) - .some((i) => record.syntaxIds.includes(i)) - } - render={(syntaxIds: number[]) => - syntaxIds ? ( - - s.syntaxIds && - s.syntaxIds.some((i) => syntaxIds.includes(i)), - )} - /> - ) : null - } - /> - )} - {tablePageSize.isNarrowWindow ? null : ( - - title="Syntaxes" - key="Syntaxes" - dataIndex={nameof("syntaxIds")} - sorter={(a, b) => arraySorter(a.syntaxIds, b.syntaxIds, syntaxes)} - width={254} - filters={syntaxes.map((s) => ({ - text: ( - <> - -  ( - { - visibleLists.filter( - (li) => li.syntaxIds && li.syntaxIds.includes(s.id), - ).length - } - ) - - ), - value: s.id, - }))} - onFilter={(value, record) => - record.syntaxIds - ? record.syntaxIds.includes(value as number) - : false - } - render={(syntaxIds: number[]) => - syntaxIds ? ( - - syntaxIds.includes(s.id), - )} - /> - ) : null - } - /> - )} - {tablePageSize.isNarrowWindow ? null : ( - - title="Languages" - key="Languages" - dataIndex={nameof("languageIds")} - sorter={(a, b) => - arraySorter(a.languageIds, b.languageIds, languages) - } - width={129} - filters={languages.map((l) => ({ - text: ( - <> - {l.iso6391}  - {l.name}  ( - { - visibleLists.filter( - (li) => li.languageIds && li.languageIds.includes(l.id), - ).length - } - ) - - ), - value: l.id, - }))} - onFilter={(value, record) => - record.languageIds - ? record.languageIds.includes(value as number) - : false - } - render={(languageIds: number[]) => - languageIds ? ( - - languageIds.includes(l.id), - )} - /> - ) : null - } - /> - )} - {tablePageSize.isNarrowWindow ? null : ( - - title="Tags" - key="Tags" - dataIndex={nameof("tagIds")} - sorter={(a, b) => arraySorter(a.tagIds, b.tagIds, tags)} - width={275} - filters={tags.map((t) => ({ - text: ( - <> - {t.name}( - { - visibleLists.filter( - (l) => l.tagIds && l.tagIds.includes(t.id), - ).length - } - ) - - ), - value: t.id.toString(), - }))} - onFilter={(value, record) => - record.tagIds ? record.tagIds.includes(Number(value)) : false - } - render={(tagIds: number[]) => - tagIds ? ( - tagIds.includes(t.id))} - /> - ) : null - } - /> - )} - {tablePageSize.isNarrowWindow ? null : ( - - title="Maintainers" - key="Maintainers" - dataIndex={nameof("maintainerIds")} - sorter={(a, b) => - arraySorter(a.maintainerIds, b.maintainerIds, maintainers) - } - width={191} - filters={maintainers.map((t) => ({ - text: ( - <> - {t.name}( - { - visibleLists.filter( - (l) => l.maintainerIds && l.maintainerIds.includes(t.id), - ).length - } - ) - - ), - value: t.id.toString(), - }))} - onFilter={(value, record) => - record.maintainerIds - ? record.maintainerIds.includes(Number(value)) - : false - } - render={(maintainerIds: number[]) => - maintainerIds ? ( - - maintainerIds.includes(t.id), - )} - /> - ) : null - } - /> - )} - {tablePageSize.isNarrowWindow ? null : ( - - title="License" - key="License" - dataIndex={nameof("licenseId")} - sorter={(a, b) => { - const licenseA = licenses.find((s) => s.id === a.licenseId); - const licenseB = licenses.find((s) => s.id === b.licenseId); - return licenseA - ? licenseB - ? licenseA.name.localeCompare(licenseB.name) - : -1 - : 1; - }} - width={215} - filters={licenses.map((l) => ({ - text: ( - <> - ( - { - visibleLists.filter( - (li) => li.licenseId && li.licenseId === l.id, - ).length - } - ) - - ), - value: l.id.toString(), - }))} - onFilter={(value, record) => - record.licenseId ? record.licenseId.toString() === value : false - } - render={(licenseId: number) => { - const license = licenses.find((l) => l.id === licenseId); - return license ? ( - - ) : null; - }} - /> - )} - - ); -}; diff --git a/web/src/components/listsTable/ListsTableHoc.tsx b/web/src/components/listsTable/ListsTableHoc.tsx deleted file mode 100644 index f2f389b4d..000000000 --- a/web/src/components/listsTable/ListsTableHoc.tsx +++ /dev/null @@ -1,45 +0,0 @@ -import { RouteComponentProps } from "react-router-dom"; -import { - useLanguages, - useLicenses, - useLists, - useMaintainers, - useSoftware, - useSyntaxes, - useTags, -} from "../../hooks"; -import { ListDrawer } from "./ListDrawer"; -import { ListsTable } from "./ListsTable"; - -export const ListsTableHoc = (props: RouteComponentProps) => { - const lists = useLists(); - const languages = useLanguages(); - const licenses = useLicenses(); - const maintainers = useMaintainers(); - const software = useSoftware(); - const syntaxes = useSyntaxes(); - const tags = useTags(); - return ( - <> - - - - ); -}; diff --git a/web/src/components/listsTable/arraySorter.ts b/web/src/components/listsTable/arraySorter.ts deleted file mode 100644 index bc03bec50..000000000 --- a/web/src/components/listsTable/arraySorter.ts +++ /dev/null @@ -1,30 +0,0 @@ -interface ArraySortableEntity { - id: number; - name: string; -} - -export const arraySorter = ( - a: number[], - b: number[], - entities: ArraySortableEntity[], -) => - a && a.length - ? b && b.length - ? a.length === b.length - ? 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 - ? -1 - : 1 - : -1 - : 1; diff --git a/web/src/components/listsTable/index.ts b/web/src/components/listsTable/index.ts deleted file mode 100644 index 541bf2eb9..000000000 --- a/web/src/components/listsTable/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { ListsTableHoc } from "./ListsTableHoc"; - -export { ListsTableHoc as ListsTable }; diff --git a/web/src/components/maintainerCloud/MaintainerCloud.tsx b/web/src/components/maintainerCloud/MaintainerCloud.tsx deleted file mode 100644 index 36970e6ec..000000000 --- a/web/src/components/maintainerCloud/MaintainerCloud.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import { Tag } from "antd"; -import { Maintainer } from "../../interfaces/Maintainer"; - -interface Props { - maintainers: Maintainer[]; -} - -export const MaintainerCloud = (props: Props) => - props.maintainers && props.maintainers.length ? ( -
- {props.maintainers.map((m: Maintainer, i: number) => - m.url ? ( - - - {m.name} - - - ) : ( - {m.name} - ), - )} -
- ) : null; diff --git a/web/src/components/maintainerCloud/index.ts b/web/src/components/maintainerCloud/index.ts deleted file mode 100644 index c0c593fa3..000000000 --- a/web/src/components/maintainerCloud/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { MaintainerCloud } from "./MaintainerCloud"; - -export { MaintainerCloud }; diff --git a/web/src/components/maintainers/Maintainers.tsx b/web/src/components/maintainers/Maintainers.tsx deleted file mode 100644 index 22c88aa90..000000000 --- a/web/src/components/maintainers/Maintainers.tsx +++ /dev/null @@ -1,63 +0,0 @@ -import "./maintainers.css"; -import { HomeOutlined, MailOutlined, TwitterOutlined } from "@ant-design/icons"; -import { Card } from "antd"; -import { Maintainer } from "../../interfaces/Maintainer"; - -interface Props { - maintainers: Maintainer[]; -} - -export const Maintainers = (props: Props) => - props.maintainers && props.maintainers.length ? ( - <> -

Maintainer{props.maintainers.length > 1 ? "s" : ""}:

- {props.maintainers.map((m: Maintainer, index: number) => ( - - ))} - - ) : null; - -interface MaintainerComponentProps { - maintainer: Maintainer; -} - -const MaintainerComponent = (props: MaintainerComponentProps) => { - let actions = []; - if (props.maintainer.url) { - actions.push( - - - , - ); - } - if (props.maintainer.emailAddress) { - actions.push( - - - , - ); - } - if (props.maintainer.twitterHandle) { - actions.push( - - - , - ); - } - return ; -}; diff --git a/web/src/components/maintainers/index.ts b/web/src/components/maintainers/index.ts deleted file mode 100644 index c44a20b8f..000000000 --- a/web/src/components/maintainers/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { Maintainers } from "./Maintainers"; - -export { Maintainers }; diff --git a/web/src/components/maintainers/maintainers.css b/web/src/components/maintainers/maintainers.css deleted file mode 100644 index a4c829226..000000000 --- a/web/src/components/maintainers/maintainers.css +++ /dev/null @@ -1,3 +0,0 @@ -.ant-card-body { - display: none; -} diff --git a/web/src/components/softwareCloud/SoftwareCloud.tsx b/web/src/components/softwareCloud/SoftwareCloud.tsx deleted file mode 100644 index cd2e26bcb..000000000 --- a/web/src/components/softwareCloud/SoftwareCloud.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import { Software } from "../../interfaces/Software"; -import { SoftwareIcon } from "./SoftwareIcon"; - -interface Props { - software: Software[]; - showLabel?: boolean; -} - -export const SoftwareCloud = (props: Props) => - props.software && props.software.length ? ( -
- {props.showLabel &&

{`Software:`}

} - {props.software.map((s: Software, i: number) => - s.homeUrl ? ( - - - - ) : ( - - ), - )} -
- ) : null; diff --git a/web/src/components/softwareCloud/SoftwareIcon.tsx b/web/src/components/softwareCloud/SoftwareIcon.tsx deleted file mode 100644 index 8a4e0dfb1..000000000 --- a/web/src/components/softwareCloud/SoftwareIcon.tsx +++ /dev/null @@ -1,116 +0,0 @@ -import { - img01, - img02, - img03, - img04, - img05, - img06, - img07, - img08, - img10, - img11, - img12, - img13, - img14, - img15, - img16, - img17, - img18, - img19, - img20, - img21, - img22, - img23, - img24, - img25, - img26, - img27, - img28, - img29, - img30, - img31, - img32, - img33, - img34, - img35, - img36, - img37, - img38, - img39, - img40, - img41, - img42, - img43, - img44, - img45, - img46, - img47, -} from "./imgs"; - -interface Props { - id: number; -} - -export const SoftwareIcon = (props: Props) => - icons[props.id] ? ( - {icons[props.id].imageTitle} - ) : null; - -interface Icon { - image: any; - imageTitle: string; -} - -const icons: { [id: number]: Icon } = { - 1: { image: img01, imageTitle: "uBlock Origin" }, - 2: { image: img02, imageTitle: "Adblock Plus" }, - 3: { image: img03, imageTitle: "AdGuard (free versions)" }, - 4: { image: img04, imageTitle: "DNS66" }, - 5: { image: img05, imageTitle: "Nano Adblocker" }, - 6: { image: img06, imageTitle: "AdBlock" }, - 7: { image: img07, imageTitle: "AdAway" }, - 8: { image: img08, imageTitle: "Personal Blocklist" }, - 10: { image: img10, imageTitle: "Redirector" }, - 11: { image: img11, imageTitle: "Hosts File Editor" }, - 12: { image: img12, imageTitle: "Gas Mask" }, - 13: { image: img13, imageTitle: "MinerBlock" }, - 14: { image: img14, imageTitle: "Pi-hole" }, - 15: { image: img15, imageTitle: "uBlock" }, - 16: { image: img16, imageTitle: "Internet Explorer (TPL)" }, - 17: { image: img17, imageTitle: "Google Hit Hider by Domain" }, - 18: { image: img18, imageTitle: "FireHOL" }, - 19: { image: img19, imageTitle: "Samsung Knox" }, - 20: { image: img20, imageTitle: "Little Snitch" }, - 21: { image: img21, imageTitle: "Privoxy" }, - 22: { image: img22, imageTitle: "Diversion" }, - 23: { image: img23, imageTitle: "dnsmasq" }, - 24: { image: img24, imageTitle: "Slimjet" }, - 25: { image: img25, imageTitle: "uMatrix" }, - 26: { image: img26, imageTitle: "Blokada" }, - 27: { image: img27, imageTitle: "hostsmgr" }, - 28: { image: img28, imageTitle: "personalDNSfilter" }, - 29: { image: img29, imageTitle: "Unbound" }, - 30: { image: img30, imageTitle: "BIND" }, - 31: { image: img31, imageTitle: "AdGuard Home" }, - 32: { image: img32, imageTitle: "AdNauseam" }, - 33: { image: img33, imageTitle: "Legacy Unix derivatives" }, - 34: { image: img34, imageTitle: "Windows command line" }, - 35: { image: img35, imageTitle: "Shadowsocks" }, - 36: { image: img36, imageTitle: "ShadowsocksR" }, - 37: { image: img37, imageTitle: "Shadowrocket" }, - 38: { image: img38, imageTitle: "DNSRedirector" }, - 39: { image: img39, imageTitle: "pfBlockerNG" }, - 40: { image: img40, imageTitle: "Opera's built-in adblocker" }, - 41: { image: img41, imageTitle: "Surge" }, - 42: { image: img42, imageTitle: "dnscrypt-proxy" }, - 43: { image: img43, imageTitle: "SmartDNS" }, - 44: { image: img44, imageTitle: "AdGuard for Windows/macOS" }, - 45: { image: img45, imageTitle: "AdGuard for Android" }, - 46: { image: img46, imageTitle: "Vivaldi's Privacy settings" }, - 47: { image: img47, imageTitle: "Polish Cookie Consent" }, -}; diff --git a/web/src/components/softwareCloud/imgs/01-uBlock-Origin.svg b/web/src/components/softwareCloud/imgs/01-uBlock-Origin.svg deleted file mode 100644 index bf5e5b0b3..000000000 --- a/web/src/components/softwareCloud/imgs/01-uBlock-Origin.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web/src/components/softwareCloud/imgs/02-Adblock-Plus.svg b/web/src/components/softwareCloud/imgs/02-Adblock-Plus.svg deleted file mode 100644 index a6c416de6..000000000 --- a/web/src/components/softwareCloud/imgs/02-Adblock-Plus.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web/src/components/softwareCloud/imgs/03-AdGuard.svg b/web/src/components/softwareCloud/imgs/03-AdGuard.svg deleted file mode 100644 index 572c19ed4..000000000 --- a/web/src/components/softwareCloud/imgs/03-AdGuard.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web/src/components/softwareCloud/imgs/04-DNS66.png b/web/src/components/softwareCloud/imgs/04-DNS66.png deleted file mode 100644 index a32dc2c2f..000000000 Binary files a/web/src/components/softwareCloud/imgs/04-DNS66.png and /dev/null differ diff --git a/web/src/components/softwareCloud/imgs/05-Nano-Adblocker.png b/web/src/components/softwareCloud/imgs/05-Nano-Adblocker.png deleted file mode 100644 index cd2b2a06d..000000000 Binary files a/web/src/components/softwareCloud/imgs/05-Nano-Adblocker.png and /dev/null differ diff --git a/web/src/components/softwareCloud/imgs/06-AdBlock.png b/web/src/components/softwareCloud/imgs/06-AdBlock.png deleted file mode 100644 index 84b1d1195..000000000 Binary files a/web/src/components/softwareCloud/imgs/06-AdBlock.png and /dev/null differ diff --git a/web/src/components/softwareCloud/imgs/07-AdAway.png b/web/src/components/softwareCloud/imgs/07-AdAway.png deleted file mode 100644 index 0826b7478..000000000 Binary files a/web/src/components/softwareCloud/imgs/07-AdAway.png and /dev/null differ diff --git a/web/src/components/softwareCloud/imgs/08-Personal-Blocklist.png b/web/src/components/softwareCloud/imgs/08-Personal-Blocklist.png deleted file mode 100644 index 9b6888a1b..000000000 Binary files a/web/src/components/softwareCloud/imgs/08-Personal-Blocklist.png and /dev/null differ diff --git a/web/src/components/softwareCloud/imgs/10-Redirector.png b/web/src/components/softwareCloud/imgs/10-Redirector.png deleted file mode 100644 index 33fa33b01..000000000 Binary files a/web/src/components/softwareCloud/imgs/10-Redirector.png and /dev/null differ diff --git a/web/src/components/softwareCloud/imgs/11-Hosts-File-Editor.png b/web/src/components/softwareCloud/imgs/11-Hosts-File-Editor.png deleted file mode 100644 index e758cf5da..000000000 Binary files a/web/src/components/softwareCloud/imgs/11-Hosts-File-Editor.png and /dev/null differ diff --git a/web/src/components/softwareCloud/imgs/12-Gas-Mask.png b/web/src/components/softwareCloud/imgs/12-Gas-Mask.png deleted file mode 100644 index 062dcbd76..000000000 Binary files a/web/src/components/softwareCloud/imgs/12-Gas-Mask.png and /dev/null differ diff --git a/web/src/components/softwareCloud/imgs/13-MinerBlock.svg b/web/src/components/softwareCloud/imgs/13-MinerBlock.svg deleted file mode 100644 index 46e214386..000000000 --- a/web/src/components/softwareCloud/imgs/13-MinerBlock.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web/src/components/softwareCloud/imgs/14-Pi-hole.svg b/web/src/components/softwareCloud/imgs/14-Pi-hole.svg deleted file mode 100644 index 882e7ccff..000000000 --- a/web/src/components/softwareCloud/imgs/14-Pi-hole.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web/src/components/softwareCloud/imgs/15-uBlock.svg b/web/src/components/softwareCloud/imgs/15-uBlock.svg deleted file mode 100644 index 848481a48..000000000 --- a/web/src/components/softwareCloud/imgs/15-uBlock.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web/src/components/softwareCloud/imgs/16-Internet-Explorer-TPL.svg b/web/src/components/softwareCloud/imgs/16-Internet-Explorer-TPL.svg deleted file mode 100644 index 69780795f..000000000 --- a/web/src/components/softwareCloud/imgs/16-Internet-Explorer-TPL.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web/src/components/softwareCloud/imgs/17-Google-Hit-Hider-by-Domain.png b/web/src/components/softwareCloud/imgs/17-Google-Hit-Hider-by-Domain.png deleted file mode 100644 index ca830def3..000000000 Binary files a/web/src/components/softwareCloud/imgs/17-Google-Hit-Hider-by-Domain.png and /dev/null differ diff --git a/web/src/components/softwareCloud/imgs/17-Google-Hit-Hider-by-Domain.svg b/web/src/components/softwareCloud/imgs/17-Google-Hit-Hider-by-Domain.svg deleted file mode 100644 index f023c8b3a..000000000 --- a/web/src/components/softwareCloud/imgs/17-Google-Hit-Hider-by-Domain.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web/src/components/softwareCloud/imgs/18-FireHOL.png b/web/src/components/softwareCloud/imgs/18-FireHOL.png deleted file mode 100644 index 5db30bb01..000000000 Binary files a/web/src/components/softwareCloud/imgs/18-FireHOL.png and /dev/null differ diff --git a/web/src/components/softwareCloud/imgs/19-Samsung-Knox.png b/web/src/components/softwareCloud/imgs/19-Samsung-Knox.png deleted file mode 100644 index bdb2f96a1..000000000 Binary files a/web/src/components/softwareCloud/imgs/19-Samsung-Knox.png and /dev/null differ diff --git a/web/src/components/softwareCloud/imgs/19-Samsung-Knox.svg b/web/src/components/softwareCloud/imgs/19-Samsung-Knox.svg deleted file mode 100644 index 75f48dc89..000000000 --- a/web/src/components/softwareCloud/imgs/19-Samsung-Knox.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web/src/components/softwareCloud/imgs/20-Little-Snitch.png b/web/src/components/softwareCloud/imgs/20-Little-Snitch.png deleted file mode 100644 index 1562eec0a..000000000 Binary files a/web/src/components/softwareCloud/imgs/20-Little-Snitch.png and /dev/null differ diff --git a/web/src/components/softwareCloud/imgs/21-Privoxy.png b/web/src/components/softwareCloud/imgs/21-Privoxy.png deleted file mode 100644 index 0ba2b59a1..000000000 Binary files a/web/src/components/softwareCloud/imgs/21-Privoxy.png and /dev/null differ diff --git a/web/src/components/softwareCloud/imgs/22-Diversion.png b/web/src/components/softwareCloud/imgs/22-Diversion.png deleted file mode 100644 index 511c8c8cd..000000000 Binary files a/web/src/components/softwareCloud/imgs/22-Diversion.png and /dev/null differ diff --git a/web/src/components/softwareCloud/imgs/22-Diversion.svg b/web/src/components/softwareCloud/imgs/22-Diversion.svg deleted file mode 100644 index 2025ad25e..000000000 --- a/web/src/components/softwareCloud/imgs/22-Diversion.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web/src/components/softwareCloud/imgs/23-dnsmasq.png b/web/src/components/softwareCloud/imgs/23-dnsmasq.png deleted file mode 100644 index 99e986ba9..000000000 Binary files a/web/src/components/softwareCloud/imgs/23-dnsmasq.png and /dev/null differ diff --git a/web/src/components/softwareCloud/imgs/24-Slimjet.png b/web/src/components/softwareCloud/imgs/24-Slimjet.png deleted file mode 100644 index 00f899268..000000000 Binary files a/web/src/components/softwareCloud/imgs/24-Slimjet.png and /dev/null differ diff --git a/web/src/components/softwareCloud/imgs/25-uMatrix.png b/web/src/components/softwareCloud/imgs/25-uMatrix.png deleted file mode 100644 index 82663fc9e..000000000 Binary files a/web/src/components/softwareCloud/imgs/25-uMatrix.png and /dev/null differ diff --git a/web/src/components/softwareCloud/imgs/26-Blokada.png b/web/src/components/softwareCloud/imgs/26-Blokada.png deleted file mode 100644 index cfd376114..000000000 Binary files a/web/src/components/softwareCloud/imgs/26-Blokada.png and /dev/null differ diff --git a/web/src/components/softwareCloud/imgs/27-hostsmgr.png b/web/src/components/softwareCloud/imgs/27-hostsmgr.png deleted file mode 100644 index 349d5b17e..000000000 Binary files a/web/src/components/softwareCloud/imgs/27-hostsmgr.png and /dev/null differ diff --git a/web/src/components/softwareCloud/imgs/28-personalDNSfilter.svg b/web/src/components/softwareCloud/imgs/28-personalDNSfilter.svg deleted file mode 100644 index bf1fae665..000000000 --- a/web/src/components/softwareCloud/imgs/28-personalDNSfilter.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web/src/components/softwareCloud/imgs/29-Unbound.png b/web/src/components/softwareCloud/imgs/29-Unbound.png deleted file mode 100644 index e6100dd8a..000000000 Binary files a/web/src/components/softwareCloud/imgs/29-Unbound.png and /dev/null differ diff --git a/web/src/components/softwareCloud/imgs/30-BIND.png b/web/src/components/softwareCloud/imgs/30-BIND.png deleted file mode 100644 index 74723afaf..000000000 Binary files a/web/src/components/softwareCloud/imgs/30-BIND.png and /dev/null differ diff --git a/web/src/components/softwareCloud/imgs/31-AdGuard-Home.png b/web/src/components/softwareCloud/imgs/31-AdGuard-Home.png deleted file mode 100644 index e217b6879..000000000 Binary files a/web/src/components/softwareCloud/imgs/31-AdGuard-Home.png and /dev/null differ diff --git a/web/src/components/softwareCloud/imgs/31-AdGuard-Home.svg b/web/src/components/softwareCloud/imgs/31-AdGuard-Home.svg deleted file mode 100644 index 27325289c..000000000 --- a/web/src/components/softwareCloud/imgs/31-AdGuard-Home.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web/src/components/softwareCloud/imgs/32-AdNauseam.png b/web/src/components/softwareCloud/imgs/32-AdNauseam.png deleted file mode 100644 index 773f3c556..000000000 Binary files a/web/src/components/softwareCloud/imgs/32-AdNauseam.png and /dev/null differ diff --git a/web/src/components/softwareCloud/imgs/33-Legacy-Unix-Derivatives.png b/web/src/components/softwareCloud/imgs/33-Legacy-Unix-Derivatives.png deleted file mode 100644 index 617ecf5bd..000000000 Binary files a/web/src/components/softwareCloud/imgs/33-Legacy-Unix-Derivatives.png and /dev/null differ diff --git a/web/src/components/softwareCloud/imgs/34-Windows-command-line.png b/web/src/components/softwareCloud/imgs/34-Windows-command-line.png deleted file mode 100644 index 0741aa5b9..000000000 Binary files a/web/src/components/softwareCloud/imgs/34-Windows-command-line.png and /dev/null differ diff --git a/web/src/components/softwareCloud/imgs/35-Shadowsocks.png b/web/src/components/softwareCloud/imgs/35-Shadowsocks.png deleted file mode 100644 index 62cc490d4..000000000 Binary files a/web/src/components/softwareCloud/imgs/35-Shadowsocks.png and /dev/null differ diff --git a/web/src/components/softwareCloud/imgs/36-ShadowsocksR.png b/web/src/components/softwareCloud/imgs/36-ShadowsocksR.png deleted file mode 100644 index 9e0e2e76f..000000000 Binary files a/web/src/components/softwareCloud/imgs/36-ShadowsocksR.png and /dev/null differ diff --git a/web/src/components/softwareCloud/imgs/37-Shadowrocket.png b/web/src/components/softwareCloud/imgs/37-Shadowrocket.png deleted file mode 100644 index 816f0fd51..000000000 Binary files a/web/src/components/softwareCloud/imgs/37-Shadowrocket.png and /dev/null differ diff --git a/web/src/components/softwareCloud/imgs/38-DNSRedirector.png b/web/src/components/softwareCloud/imgs/38-DNSRedirector.png deleted file mode 100644 index 9742d8280..000000000 Binary files a/web/src/components/softwareCloud/imgs/38-DNSRedirector.png and /dev/null differ diff --git a/web/src/components/softwareCloud/imgs/39-pfBlockerNG.png b/web/src/components/softwareCloud/imgs/39-pfBlockerNG.png deleted file mode 100644 index c831c6858..000000000 Binary files a/web/src/components/softwareCloud/imgs/39-pfBlockerNG.png and /dev/null differ diff --git a/web/src/components/softwareCloud/imgs/40-Opera.png b/web/src/components/softwareCloud/imgs/40-Opera.png deleted file mode 100644 index 359defd58..000000000 Binary files a/web/src/components/softwareCloud/imgs/40-Opera.png and /dev/null differ diff --git a/web/src/components/softwareCloud/imgs/41-Surge.png b/web/src/components/softwareCloud/imgs/41-Surge.png deleted file mode 100644 index af42ee9d5..000000000 Binary files a/web/src/components/softwareCloud/imgs/41-Surge.png and /dev/null differ diff --git a/web/src/components/softwareCloud/imgs/42-dnscrypt-proxy.png b/web/src/components/softwareCloud/imgs/42-dnscrypt-proxy.png deleted file mode 100644 index 6acfbe273..000000000 Binary files a/web/src/components/softwareCloud/imgs/42-dnscrypt-proxy.png and /dev/null differ diff --git a/web/src/components/softwareCloud/imgs/43-SmartDNS.png b/web/src/components/softwareCloud/imgs/43-SmartDNS.png deleted file mode 100644 index e5c398e72..000000000 Binary files a/web/src/components/softwareCloud/imgs/43-SmartDNS.png and /dev/null differ diff --git a/web/src/components/softwareCloud/imgs/44-AdGuard-for-WindowsMac.svg b/web/src/components/softwareCloud/imgs/44-AdGuard-for-WindowsMac.svg deleted file mode 100644 index b64078c9e..000000000 --- a/web/src/components/softwareCloud/imgs/44-AdGuard-for-WindowsMac.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web/src/components/softwareCloud/imgs/45-AdGuard-for-Android.svg b/web/src/components/softwareCloud/imgs/45-AdGuard-for-Android.svg deleted file mode 100644 index d61f43a2a..000000000 --- a/web/src/components/softwareCloud/imgs/45-AdGuard-for-Android.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web/src/components/softwareCloud/imgs/46-Vivaldi.svg b/web/src/components/softwareCloud/imgs/46-Vivaldi.svg deleted file mode 100644 index bfa14480b..000000000 --- a/web/src/components/softwareCloud/imgs/46-Vivaldi.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web/src/components/softwareCloud/imgs/47-PolishCookieConsent.png b/web/src/components/softwareCloud/imgs/47-PolishCookieConsent.png deleted file mode 100644 index c72cb4a8f..000000000 Binary files a/web/src/components/softwareCloud/imgs/47-PolishCookieConsent.png and /dev/null differ diff --git a/web/src/components/softwareCloud/imgs/imgs.d.ts b/web/src/components/softwareCloud/imgs/imgs.d.ts deleted file mode 100644 index 6a0db5775..000000000 --- a/web/src/components/softwareCloud/imgs/imgs.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -declare module "*.svg" { - const content: any; - export default content; -} - -declare module "*.png" { - const content: any; - export default content; -} diff --git a/web/src/components/softwareCloud/imgs/index.ts b/web/src/components/softwareCloud/imgs/index.ts deleted file mode 100644 index 5485a4e0a..000000000 --- a/web/src/components/softwareCloud/imgs/index.ts +++ /dev/null @@ -1,95 +0,0 @@ -import img01 from "./01-uBlock-Origin.svg"; -import img02 from "./02-Adblock-Plus.svg"; -import img03 from "./03-AdGuard.svg"; -import img04 from "./04-DNS66.png"; -import img05 from "./05-Nano-Adblocker.png"; -import img06 from "./06-AdBlock.png"; -import img07 from "./07-AdAway.png"; -import img08 from "./08-Personal-Blocklist.png"; -import img10 from "./10-Redirector.png"; -import img11 from "./11-Hosts-File-Editor.png"; -import img12 from "./12-Gas-Mask.png"; -import img13 from "./13-MinerBlock.svg"; -import img14 from "./14-Pi-hole.svg"; -import img15 from "./15-uBlock.svg"; -import img16 from "./16-Internet-Explorer-TPL.svg"; -import img17 from "./17-Google-Hit-Hider-by-Domain.svg"; -import img18 from "./18-FireHOL.png"; -import img19 from "./19-Samsung-Knox.svg"; -import img20 from "./20-Little-Snitch.png"; -import img21 from "./21-Privoxy.png"; -import img22 from "./22-Diversion.svg"; -import img23 from "./23-dnsmasq.png"; -import img24 from "./24-Slimjet.png"; -import img25 from "./25-uMatrix.png"; -import img26 from "./26-Blokada.png"; -import img27 from "./27-hostsmgr.png"; -import img28 from "./28-personalDNSfilter.svg"; -import img29 from "./29-Unbound.png"; -import img30 from "./30-BIND.png"; -import img31 from "./31-AdGuard-Home.svg"; -import img32 from "./32-AdNauseam.png"; -import img33 from "./33-Legacy-Unix-Derivatives.png"; -import img34 from "./34-Windows-command-line.png"; -import img35 from "./35-Shadowsocks.png"; -import img36 from "./36-ShadowsocksR.png"; -import img37 from "./37-Shadowrocket.png"; -import img38 from "./38-DNSRedirector.png"; -import img39 from "./39-pfBlockerNG.png"; -import img40 from "./40-Opera.png"; -import img41 from "./41-Surge.png"; -import img42 from "./42-dnscrypt-proxy.png"; -import img43 from "./43-SmartDNS.png"; -import img44 from "./44-AdGuard-for-WindowsMac.svg"; -import img45 from "./45-AdGuard-for-Android.svg"; -import img46 from "./46-Vivaldi.svg"; -import img47 from "./47-PolishCookieConsent.png"; - -export { - img01, - img02, - img03, - img04, - img05, - img06, - img07, - img08, - img10, - img11, - img12, - img13, - img14, - img15, - img16, - img17, - img18, - img19, - img20, - img21, - img22, - img23, - img24, - img25, - img26, - img27, - img28, - img29, - img30, - img31, - img32, - img33, - img34, - img35, - img36, - img37, - img38, - img39, - img40, - img41, - img42, - img43, - img44, - img45, - img46, - img47, -}; diff --git a/web/src/components/softwareCloud/index.ts b/web/src/components/softwareCloud/index.ts deleted file mode 100644 index 7d1202f00..000000000 --- a/web/src/components/softwareCloud/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { SoftwareCloud } from "./SoftwareCloud"; -import { SoftwareIcon } from "./SoftwareIcon"; - -export { SoftwareCloud, SoftwareIcon }; diff --git a/web/src/components/syntaxCloud/SyntaxCloud.tsx b/web/src/components/syntaxCloud/SyntaxCloud.tsx deleted file mode 100644 index 96b279638..000000000 --- a/web/src/components/syntaxCloud/SyntaxCloud.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import { Syntax } from "../../interfaces/Syntax"; -import { SyntaxTag } from "../SyntaxTag"; - -interface Props { - syntaxes: Syntax[]; - showLabel?: boolean; -} - -export const SyntaxCloud = (props: Props) => - props.syntaxes && props.syntaxes.length ? ( -
- {props.showLabel && ( -

{`Syntax${props.syntaxes.length > 1 ? "es" : ""}:`}

- )} - {props.syntaxes.map((s: Syntax, i: number) => ( - - ))} -
- ) : null; diff --git a/web/src/components/syntaxCloud/index.ts b/web/src/components/syntaxCloud/index.ts deleted file mode 100644 index 1c799b549..000000000 --- a/web/src/components/syntaxCloud/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { SyntaxCloud } from "./SyntaxCloud"; - -export { SyntaxCloud }; diff --git a/web/src/components/tagCloud/TagCloud.tsx b/web/src/components/tagCloud/TagCloud.tsx deleted file mode 100644 index edb0e2be4..000000000 --- a/web/src/components/tagCloud/TagCloud.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import { Tag } from "antd"; -import { Tag as TagInterface } from "../../interfaces/Tag"; - -interface Props { - tags: TagInterface[]; - showLabel?: boolean; -} - -export const TagCloud = (props: Props) => - props.tags && props.tags.length ? ( -
- {props.showLabel &&

{`Tag${props.tags.length > 1 ? "s" : ""}:`}

} - {props.tags.map((t: TagInterface, i: number) => ( - - {t.name} - - ))} -
- ) : null; diff --git a/web/src/components/tagCloud/index.ts b/web/src/components/tagCloud/index.ts deleted file mode 100644 index 6cea6c0e9..000000000 --- a/web/src/components/tagCloud/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { TagCloud } from "./TagCloud"; - -export { TagCloud }; diff --git a/web/src/constants.ts b/web/src/constants.ts deleted file mode 100644 index b8ecfa656..000000000 --- a/web/src/constants.ts +++ /dev/null @@ -1 +0,0 @@ -export const SlugifyOptions = { remove: /[^a-zA-Z0-9- ]/g, lower: true }; diff --git a/web/src/hooks/index.ts b/web/src/hooks/index.ts deleted file mode 100644 index 44f8849e9..000000000 --- a/web/src/hooks/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { useLanguages } from "./useLanguages"; -import { useLicenses } from "./useLicenses"; -import { useLists } from "./useLists"; -import { useListDetails } from "./useListDetails"; -import { useMaintainers } from "./useMaintainers"; -import { useSearchColumnFilter } from "./useSearchColumnFilter"; -import { useSoftware } from "./useSoftware"; -import { useSyntaxes } from "./useSyntaxes"; -import { useTablePageSizer } from "./useTablePageSizer"; -import { useTags } from "./useTags"; - -export { - useLanguages, - useLicenses, - useLists, - useListDetails, - useMaintainers, - useSearchColumnFilter, - useSoftware, - useSyntaxes, - useTablePageSizer, - useTags, -}; diff --git a/web/src/hooks/useApiData.tsx b/web/src/hooks/useApiData.tsx deleted file mode 100644 index 3fdc03d53..000000000 --- a/web/src/hooks/useApiData.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import { useEffect, useState } from "react"; - -export const useApiData = (url: string) => { - const [data, setData] = useState(); - useEffect(() => { - const fetchData = async () => - (await fetch(url)).json().then((r) => setData(r)); - fetchData(); - }, [url]); - return data; -}; diff --git a/web/src/hooks/useLanguages.tsx b/web/src/hooks/useLanguages.tsx deleted file mode 100644 index 5bd927a1c..000000000 --- a/web/src/hooks/useLanguages.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import { Language } from "../interfaces/Language"; -import { useApiData } from "./useApiData"; - -export const useLanguages = () => - (useApiData("https://api.filterlists.com/languages") || []).sort( - (a: Language, b: Language) => a.name.localeCompare(b.name), - ); diff --git a/web/src/hooks/useLicenses.tsx b/web/src/hooks/useLicenses.tsx deleted file mode 100644 index 0f07622aa..000000000 --- a/web/src/hooks/useLicenses.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import { License } from "../interfaces/License"; -import { useApiData } from "./useApiData"; - -export const useLicenses = () => - (useApiData("https://api.filterlists.com/licenses") || []).sort( - (a: License, b: License) => a.name.localeCompare(b.name), - ); diff --git a/web/src/hooks/useListDetails.tsx b/web/src/hooks/useListDetails.tsx deleted file mode 100644 index 83ae330a1..000000000 --- a/web/src/hooks/useListDetails.tsx +++ /dev/null @@ -1,6 +0,0 @@ -import { ListDetails } from "../interfaces/ListDetails"; -import { useApiData } from "./useApiData"; - -export const useListDetails = (id: number) => { - return useApiData("https://api.filterlists.com/lists/" + id); -}; diff --git a/web/src/hooks/useLists.tsx b/web/src/hooks/useLists.tsx deleted file mode 100644 index 180501bed..000000000 --- a/web/src/hooks/useLists.tsx +++ /dev/null @@ -1,10 +0,0 @@ -import slugify from "slugify"; -import { SlugifyOptions } from "../constants"; -import { List } from "../interfaces/List"; -import { useApiData } from "./useApiData"; - -export const useLists = () => { - const lists = useApiData("https://api.filterlists.com/lists"); - lists && lists.forEach((l) => (l.slug = slugify(l.name, SlugifyOptions))); - return (lists || []).sort((a: List, b: List) => a.name.localeCompare(b.name)); -}; diff --git a/web/src/hooks/useMaintainers.tsx b/web/src/hooks/useMaintainers.tsx deleted file mode 100644 index 0213d7d62..000000000 --- a/web/src/hooks/useMaintainers.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import { Maintainer } from "../interfaces/Maintainer"; -import { useApiData } from "./useApiData"; - -export const useMaintainers = () => - ( - useApiData("https://api.filterlists.com/maintainers") || [] - ).sort((a: Maintainer, b: Maintainer) => a.name.localeCompare(b.name)); diff --git a/web/src/hooks/useSearchColumnFilter.tsx b/web/src/hooks/useSearchColumnFilter.tsx deleted file mode 100644 index 54ec142eb..000000000 --- a/web/src/hooks/useSearchColumnFilter.tsx +++ /dev/null @@ -1,84 +0,0 @@ -import { SearchOutlined } from "@ant-design/icons"; -import { Button, Input } from "antd"; -import React, { useEffect, useState } from "react"; -import { - FilterConfirmProps, - FilterDropdownProps, -} from "antd/lib/table/interface"; - -interface FilterPropsState { - filterDropdown?: - | React.ReactNode - | ((props: FilterDropdownProps) => React.ReactNode); - filterIcon?: React.ReactNode | ((filtered: boolean) => React.ReactNode); - onFilter?: (value: any, record: T) => boolean; -} - -export const useSearchColumnFilter = (dataIndex: string) => { - const [filterProps, setFilterProps] = useState>({ - filterDropdown: undefined, - filterIcon: undefined, - onFilter: undefined, - }); - useEffect(() => { - const handleSearch = (confirm?: (param: FilterConfirmProps) => void) => { - confirm && confirm({ closeDropdown: true }); - }; - const handleReset = (clearFilters?: (selectedKeys: string[]) => void) => { - clearFilters && clearFilters([]); - }; - setFilterProps({ - filterDropdown: ({ - setSelectedKeys, - selectedKeys, - confirm, - clearFilters, - }) => ( -
- - setSelectedKeys && - setSelectedKeys(e.target.value ? [e.target.value] : []) - } - onPressEnter={() => handleSearch(confirm)} - style={{ width: 188, marginBottom: 8, display: "block" }} - /> - - -
- ), - filterIcon: (filtered) => ( - - ), - onFilter: (value, record) => { - const searchValue = (record as any)[dataIndex]; - return ( - searchValue && - searchValue - .toString() - .toLowerCase() - .includes(value.toString().toLowerCase()) - ); - }, - }); - }, [dataIndex]); - return filterProps; -}; diff --git a/web/src/hooks/useSoftware.tsx b/web/src/hooks/useSoftware.tsx deleted file mode 100644 index b64079d05..000000000 --- a/web/src/hooks/useSoftware.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import { Software } from "../interfaces/Software"; -import { useApiData } from "./useApiData"; - -export const useSoftware = () => - (useApiData("https://api.filterlists.com/software") || []).sort( - (a: Software, b: Software) => a.name.localeCompare(b.name), - ); diff --git a/web/src/hooks/useSyntaxes.tsx b/web/src/hooks/useSyntaxes.tsx deleted file mode 100644 index 094641e32..000000000 --- a/web/src/hooks/useSyntaxes.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import { Syntax } from "../interfaces/Syntax"; -import { useApiData } from "./useApiData"; - -export const useSyntaxes = () => - (useApiData("https://api.filterlists.com/syntaxes") || []).sort( - (a: Syntax, b: Syntax) => a.name.localeCompare(b.name), - ); diff --git a/web/src/hooks/useTablePageSizer.tsx b/web/src/hooks/useTablePageSizer.tsx deleted file mode 100644 index 3ef57d6c7..000000000 --- a/web/src/hooks/useTablePageSizer.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import { useEffect, useState } from "react"; - -interface TablePageSize { - pageSize: number; - isNarrowWindow: boolean; - isWideWindow: boolean; -} - -export const useTablePageSizer = () => { - const [state, setState] = useState(calculateSize()); - useEffect(() => { - const updatePageSize = () => setState(calculateSize()); - window.addEventListener("resize", updatePageSize); - return () => window.removeEventListener("resize", updatePageSize); - }, []); - return state; -}; - -const calculateSize = () => ({ - pageSize: - window.innerWidth < 576 - ? Math.floor((window.innerHeight - 214) / 51) - : Math.floor((window.innerHeight - 187) / 63), - isNarrowWindow: window.innerWidth < 576 ? true : false, - isWideWindow: window.innerWidth > 1918 ? true : false, -}); diff --git a/web/src/hooks/useTags.tsx b/web/src/hooks/useTags.tsx deleted file mode 100644 index 8a4d432b7..000000000 --- a/web/src/hooks/useTags.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import { Tag } from "../interfaces/Tag"; -import { useApiData } from "./useApiData"; - -export const useTags = () => - (useApiData("https://api.filterlists.com/tags") || []).sort( - (a: Tag, b: Tag) => a.name.localeCompare(b.name), - ); diff --git a/web/src/index.css b/web/src/index.css deleted file mode 100644 index bcb51070b..000000000 --- a/web/src/index.css +++ /dev/null @@ -1,30 +0,0 @@ -body { - margin: 0; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", - "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", - sans-serif; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -code { - font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", - monospace; -} - -td.ant-table-cell > * { - height: 42px; - overflow: hidden; -} - -td.ant-table-cell { - padding: 2px 4px 4px 2px; -} - -td.ant-table-column-sort { - background: rgb(20, 20, 20); -} - -.ant-tag { - margin: 0px 8px 2px 0px; -} diff --git a/web/src/index.tsx b/web/src/index.tsx deleted file mode 100644 index 35eaa8517..000000000 --- a/web/src/index.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import React from "react"; -import { createRoot } from "react-dom/client"; -import { App } from "./App"; -import "./index.css"; -import reportWebVitals from "./reportWebVitals"; - -const container = document.getElementById("root"); -const root = createRoot(container!); - -root.render( - - - , -); - -// If you want to start measuring performance in your app, pass a function -// to log results (for example: reportWebVitals(console.log)) -// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals -reportWebVitals(); diff --git a/web/src/interfaces/Language.ts b/web/src/interfaces/Language.ts deleted file mode 100644 index e5ef4972c..000000000 --- a/web/src/interfaces/Language.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface Language { - id: number; - iso6391: string; - name: string; -} diff --git a/web/src/interfaces/License.ts b/web/src/interfaces/License.ts deleted file mode 100644 index 22e392155..000000000 --- a/web/src/interfaces/License.ts +++ /dev/null @@ -1,8 +0,0 @@ -export interface License { - id: number; - name: string; - url: string; - permitsModification: boolean; - permitsDistribution: boolean; - permitsCommercialUse: boolean; -} diff --git a/web/src/interfaces/List.ts b/web/src/interfaces/List.ts deleted file mode 100644 index 75c0a74bc..000000000 --- a/web/src/interfaces/List.ts +++ /dev/null @@ -1,13 +0,0 @@ -export interface List { - id: number; - name: string; - description?: string; - licenseId?: number; - syntaxIds: number[]; - languageIds: number[]; - tagIds: number[]; - maintainerIds: number[]; - - // auto-generated by useLists hook - slug: string; -} diff --git a/web/src/interfaces/ListDetails.ts b/web/src/interfaces/ListDetails.ts deleted file mode 100644 index 7084ac898..000000000 --- a/web/src/interfaces/ListDetails.ts +++ /dev/null @@ -1,32 +0,0 @@ -export interface ListDetails { - id: number; - name: string; - description?: string; - licenseId?: number; - syntaxIds: number[]; - languageIds: number[]; - tagIds: number[]; - viewUrls: ViewUrl[]; - homeUrl?: string; - onionUrl?: string; - policyUrl?: string; - submissionUrl?: string; - issuesUrl?: string; - forumUrl?: string; - chatUrl?: string; - emailAddress?: string; - donateUrl?: string; - maintainerIds: number[]; - upstreamFilterListIds: number[]; - forkFilterListIds: number[]; - includedInFilterListIds: number[]; - includesFilterListIds: number[]; - dependencyFilterListIds: number[]; - dependentFilterListIds: number[]; -} - -export interface ViewUrl { - segmentNumber: number; - primariness: number; - url: string; -} diff --git a/web/src/interfaces/Maintainer.ts b/web/src/interfaces/Maintainer.ts deleted file mode 100644 index bc8e3be04..000000000 --- a/web/src/interfaces/Maintainer.ts +++ /dev/null @@ -1,7 +0,0 @@ -export interface Maintainer { - id: number; - name: string; - url?: string; - emailAddress?: string; - twitterHandle?: string; -} diff --git a/web/src/interfaces/Software.ts b/web/src/interfaces/Software.ts deleted file mode 100644 index 9598837cf..000000000 --- a/web/src/interfaces/Software.ts +++ /dev/null @@ -1,9 +0,0 @@ -export interface Software { - id: number; - name: string; - description?: string; - homeUrl?: string; - downloadUrl?: string; - supportsAbpUrlScheme: boolean; - syntaxIds: number[]; -} diff --git a/web/src/interfaces/Syntax.ts b/web/src/interfaces/Syntax.ts deleted file mode 100644 index 9b409bfea..000000000 --- a/web/src/interfaces/Syntax.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface Syntax { - id: number; - name: string; - description?: string; - url?: string; -} diff --git a/web/src/interfaces/Tag.ts b/web/src/interfaces/Tag.ts deleted file mode 100644 index 068c32671..000000000 --- a/web/src/interfaces/Tag.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface Tag { - id: number; - name: string; - description?: string; -} diff --git a/web/src/react-app-env.d.ts b/web/src/react-app-env.d.ts deleted file mode 100644 index 6431bc5fc..000000000 --- a/web/src/react-app-env.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// diff --git a/web/src/reportWebVitals.ts b/web/src/reportWebVitals.ts deleted file mode 100644 index 5fa3583b7..000000000 --- a/web/src/reportWebVitals.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { ReportHandler } from "web-vitals"; - -const reportWebVitals = (onPerfEntry?: ReportHandler) => { - if (onPerfEntry && onPerfEntry instanceof Function) { - import("web-vitals").then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { - getCLS(onPerfEntry); - getFID(onPerfEntry); - getFCP(onPerfEntry); - getLCP(onPerfEntry); - getTTFB(onPerfEntry); - }); - } -}; - -export default reportWebVitals; diff --git a/web/src/setupProxy.js b/web/src/setupProxy.js deleted file mode 100644 index 21ad6fec5..000000000 --- a/web/src/setupProxy.js +++ /dev/null @@ -1,11 +0,0 @@ -const { createProxyMiddleware } = require("http-proxy-middleware"); - -module.exports = function (app) { - app.use( - "https://api.filterlists.com", - createProxyMiddleware({ - target: "http://localhost:8080", - changeOrigin: true, - }), - ); -}; diff --git a/web/src/setupTests.ts b/web/src/setupTests.ts deleted file mode 100644 index 1dd407a63..000000000 --- a/web/src/setupTests.ts +++ /dev/null @@ -1,5 +0,0 @@ -// jest-dom adds custom jest matchers for asserting on DOM nodes. -// allows you to do things like: -// expect(element).toHaveTextContent(/react/i) -// learn more: https://github.com/testing-library/jest-dom -import "@testing-library/jest-dom"; diff --git a/web/src/utils/index.ts b/web/src/utils/index.ts deleted file mode 100644 index 844235139..000000000 --- a/web/src/utils/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { nameof } from "./nameof"; - -export { nameof }; diff --git a/web/src/utils/nameof.ts b/web/src/utils/nameof.ts deleted file mode 100644 index 282dd0ab2..000000000 --- a/web/src/utils/nameof.ts +++ /dev/null @@ -1,2 +0,0 @@ -//https://stackoverflow.com/a/50470026/2343739 -export const nameof = (name: Extract) => name; diff --git a/web/staticwebapp.config.json b/web/staticwebapp.config.json deleted file mode 100644 index 2b79ae976..000000000 --- a/web/staticwebapp.config.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "routes": [ - { - "route": "/static/*", - "headers": { - "Cache-Control": "public, max-age=31536000, immutable" - } - }, - { - "route": "/favicon.ico", - "headers": { - "Cache-Control": "public, max-age=86400" - } - }, - { - "route": "/logo_filterlists.png", - "headers": { - "Cache-Control": "public, max-age=31536000, immutable" - } - }, - { - "route": "/icon_filterlists.png", - "headers": { - "Cache-Control": "public, max-age=31536000, immutable" - } - }, - { - "route": "/manifest.json", - "headers": { - "Cache-Control": "public, max-age=86400" - } - }, - { - "route": "/robots.txt", - "headers": { - "Cache-Control": "public, max-age=86400" - } - }, - { - "route": "/tpl-redirect.js", - "headers": { - "Cache-Control": "public, max-age=86400" - } - }, - { - "route": "/tpl.html", - "headers": { - "Cache-Control": "public, max-age=86400" - } - } - ], - "navigationFallback": { - "rewrite": "/index.html" - }, - "trailingSlash": "never", - "globalHeaders": { - "Content-Security-Policy": "upgrade-insecure-requests; default-src 'none'; base-uri 'none'; frame-ancestors 'none'; form-action 'none'; connect-src 'self' https://api.filterlists.com; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; manifest-src 'self';", - "Permissions-Policy": "accelerometer=(), ambient-light-sensor=(), attribution-reporting=(), autoplay=(), battery=(), bluetooth=(), browsing-topics=(), camera=(), compute-pressure=(), display-capture=(), document-domain=(), encrypted-media=(), execution-while-not-rendered=(), execution-while-out-of-viewport=(), fullscreen=(), gamepad=(), geolocation=(), gyroscope=(), hid=(), identity-credentials-get=(), idle-detection=(), local-fonts=(), magnetometer=(), microphone=(), midi=(), otp-credentials=(), payment=(), picture-in-picture=(), publickey-credentials-create=(), publickey-credentials-get=(), screen-wake-lock=(), serial=(), speaker-selection=(), storage-access=(), usb=(), web-share=(), window-management=(), xr-spatial-tracking=()" - } -} diff --git a/web/tsconfig.json b/web/tsconfig.json deleted file mode 100644 index 9d379a3c4..000000000 --- a/web/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "lib": ["dom", "dom.iterable", "esnext"], - "allowJs": true, - "skipLibCheck": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "strict": true, - "forceConsistentCasingInFileNames": true, - "noFallthroughCasesInSwitch": true, - "module": "esnext", - "moduleResolution": "node", - "resolveJsonModule": true, - "isolatedModules": true, - "noEmit": true, - "jsx": "react-jsx" - }, - "include": ["src"] -}