From 2ec7bdbd18f82bcb0fb61fd482ab5c769e6bec3f Mon Sep 17 00:00:00 2001 From: Daohan Chong Date: Sat, 18 Nov 2023 15:43:28 +0000 Subject: [PATCH] many fxies --- .dockerignore | 2 ++ Dockerfile | 3 +-- frontend/package.json | 6 ++++++ frontend/src/components/ProxyList.tsx | 8 ++++---- frontend/src/components/ProxyListFilter.tsx | 2 +- 5 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.dockerignore b/.dockerignore index 59e455e..7a40216 100644 --- a/.dockerignore +++ b/.dockerignore @@ -124,3 +124,5 @@ node_modules package-lock.json scylla.db-journal + +venv/ diff --git a/Dockerfile b/Dockerfile index c027f5f..9b1c4e8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,6 @@ FROM node:lts as node-build WORKDIR /root COPY . . -RUN npm install RUN cd frontend && npm install RUN make assets-build @@ -13,7 +12,7 @@ ENV DEBIAN_FRONTEND=noninteractive ENV TZ=America/Los_Angeles RUN apt-get update && \ - apt-get install -y python3 python3-distutils libpython3.8-dev curl g++ gcc libxslt-dev make libcurl4-openssl-dev build-essential libssl-dev && \ + apt-get install -y python3 python3-distutils libpython3-dev curl g++ gcc libxslt-dev make libcurl4-openssl-dev build-essential libssl-dev && \ update-alternatives --install /usr/bin/python python /usr/bin/python3 1 && \ curl -sSL https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \ python get-pip.py && \ diff --git a/frontend/package.json b/frontend/package.json index 8bd1b2d..b80be99 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -11,6 +11,10 @@ "preview": "vite preview" }, "dependencies": { + "axios": "^1.6.2", + "milligram": "^1.4.1", + "moment": "^2.29.4", + "query-string": "^8.1.0", "react": "^18.2.0", "react-dom": "^18.2.0", "react-router": "^6.19.0", @@ -19,6 +23,7 @@ "react-tooltip": "^5.23.0" }, "devDependencies": { + "@types/node": "^20.9.1", "@types/react": "^18.2.37", "@types/react-dom": "^18.2.15", "@types/react-simple-maps": "^3.0.3", @@ -28,6 +33,7 @@ "eslint": "^8.53.0", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.4", + "sass": "^1.69.5", "typescript": "^5.2.2", "vite": "^5.0.0" } diff --git a/frontend/src/components/ProxyList.tsx b/frontend/src/components/ProxyList.tsx index 975bb08..473cdf6 100644 --- a/frontend/src/components/ProxyList.tsx +++ b/frontend/src/components/ProxyList.tsx @@ -3,7 +3,7 @@ import axios from 'axios'; import {Link} from 'react-router-dom'; import {getBaseURL, Proxy, ResponseJSON} from '../utils'; -import * as queryString from "query-string"; +import queryString from "query-string"; import ProxyListFilter from "./ProxyListFilter"; import moment from 'moment' @@ -87,6 +87,7 @@ export default class ProxyIPList extends React.Component { } async loadData(props: any) { + const parsed = queryString.parse(props.location.search); const page = parsed['page'] || 1; @@ -141,11 +142,10 @@ export default class ProxyIPList extends React.Component { private renderPageLink(pageNumber: number, label: string): JSX.Element { const parsed = queryString.parse(this.props.location.search); - - parsed['page'] = pageNumber; + return ( -
  • {label}
  • +
  • {label}
  • ); } diff --git a/frontend/src/components/ProxyListFilter.tsx b/frontend/src/components/ProxyListFilter.tsx index 942612d..ee07d6a 100644 --- a/frontend/src/components/ProxyListFilter.tsx +++ b/frontend/src/components/ProxyListFilter.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import {Link} from "react-router-dom"; -import * as queryString from "query-string"; +import queryString from "query-string"; export interface ProxyListFilterProps { location: any;