增加代理展示
This commit is contained in:
@@ -101,6 +101,7 @@ export interface AccountCheckBatchRequest {
|
||||
concurrency?: number;
|
||||
max_login_retries?: number;
|
||||
max_total_time?: number;
|
||||
use_proxy?: boolean;
|
||||
}
|
||||
|
||||
export interface AccountCheckItem {
|
||||
@@ -121,6 +122,7 @@ export interface AccountCheckBatch {
|
||||
concurrency: number;
|
||||
max_login_retries: number;
|
||||
max_total_time: number;
|
||||
use_proxy: boolean;
|
||||
total: number;
|
||||
finished_count: number;
|
||||
running_count: number;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
||||
import {
|
||||
Button, Card, Col, Input, InputNumber, message, Popconfirm, Row, Space, Statistic, Table, Tag, Typography,
|
||||
Button, Card, Col, Input, InputNumber, message, Popconfirm, Row, Space, Statistic, Switch, Table, Tag, Typography,
|
||||
} from 'antd';
|
||||
import type { TableProps } from 'antd';
|
||||
import { DownloadOutlined, PlayCircleOutlined, ReloadOutlined, StopOutlined } from '@ant-design/icons';
|
||||
@@ -88,6 +88,7 @@ export default function AccountCheckPage() {
|
||||
const [concurrency, setConcurrency] = useState(() => readStoredNumber('account_check_concurrency', 3));
|
||||
const [maxTotalTime, setMaxTotalTime] = useState(() => readStoredNumber('account_check_max_total_time', 300));
|
||||
const [maxLoginRetries, setMaxLoginRetries] = useState(() => readStoredNumber('account_check_max_login_retries', 0));
|
||||
const [useProxy, setUseProxy] = useState(() => localStorage.getItem('account_check_use_proxy') === 'true');
|
||||
const [batch, setBatch] = useState<AccountCheckBatch | null>(null);
|
||||
const [starting, setStarting] = useState(false);
|
||||
const [refreshing, setRefreshing] = useState(false);
|
||||
@@ -141,6 +142,10 @@ export default function AccountCheckPage() {
|
||||
localStorage.setItem('account_check_max_login_retries', String(maxLoginRetries));
|
||||
}, [maxLoginRetries]);
|
||||
|
||||
useEffect(() => {
|
||||
localStorage.setItem('account_check_use_proxy', String(useProxy));
|
||||
}, [useProxy]);
|
||||
|
||||
useEffect(() => {
|
||||
if (restoredBatchRef.current) return;
|
||||
restoredBatchRef.current = true;
|
||||
@@ -178,6 +183,7 @@ export default function AccountCheckPage() {
|
||||
concurrency,
|
||||
max_total_time: maxTotalTime,
|
||||
max_login_retries: maxLoginRetries,
|
||||
use_proxy: useProxy,
|
||||
});
|
||||
setBatch(data);
|
||||
localStorage.setItem(BATCH_STORAGE_KEY, data.batch_id);
|
||||
@@ -290,7 +296,19 @@ export default function AccountCheckPage() {
|
||||
style={{ width: '100%' }}
|
||||
/>
|
||||
</Col>
|
||||
<Col xs={24} md={12}>
|
||||
<Col xs={12} md={4}>
|
||||
<Text type="secondary">代理</Text>
|
||||
<div style={{ height: 32, display: 'flex', alignItems: 'center' }}>
|
||||
<Switch
|
||||
checked={useProxy}
|
||||
checkedChildren="开"
|
||||
unCheckedChildren="关"
|
||||
onChange={setUseProxy}
|
||||
disabled={isRunning}
|
||||
/>
|
||||
</div>
|
||||
</Col>
|
||||
<Col xs={24} md={8}>
|
||||
<Space wrap>
|
||||
<Button
|
||||
type="primary"
|
||||
|
||||
Reference in New Issue
Block a user