Skip to content

Commit

Permalink
many fxies
Browse files Browse the repository at this point in the history
  • Loading branch information
imWildCat committed Nov 18, 2023
1 parent 0963eb0 commit 2ec7bdb
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,5 @@ node_modules
package-lock.json
scylla.db-journal


venv/
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 && \
Expand Down
6 changes: 6 additions & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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"
}
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/components/ProxyList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -87,6 +87,7 @@ export default class ProxyIPList extends React.Component<Props, AppState> {
}

async loadData(props: any) {

const parsed = queryString.parse(props.location.search);

const page = parsed['page'] || 1;
Expand Down Expand Up @@ -141,11 +142,10 @@ export default class ProxyIPList extends React.Component<Props, AppState> {

private renderPageLink(pageNumber: number, label: string): JSX.Element {
const parsed = queryString.parse(this.props.location.search);

parsed['page'] = pageNumber;


return (
<li key={`page-nav-${pageNumber}`}><Link to={`/?${queryString.stringify(parsed)}`}>{label}</Link></li>
<li key={`page-nav-${pageNumber}`}><Link to={`/?${queryString.stringify(parsed)}&{page=${pageNumber}}`}>{label}</Link></li>
);
}

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/ProxyListFilter.tsx
Original file line number Diff line number Diff line change
@@ -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;
Expand Down

0 comments on commit 2ec7bdb

Please sign in to comment.