Skip to content

Commit

Permalink
feat: after span
Browse files Browse the repository at this point in the history
  • Loading branch information
trueai-org committed Aug 8, 2024
1 parent afe7562 commit 3b25387
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/locales/en-US/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ export default {
'pages.task.deleteSuccess': 'Delete task successful',

'pages.account.info': 'Account Info',
'pages.account.interval': 'Task interval (seconds)',
'pages.account.interval': 'Interval before execution (seconds)',
'pages.account.intervalAfter':'Wait after execution (seconds)',
'pages.account.cfRefresh': 'Regenerates the CF validation link',
'pages.account.cfok': 'Mark verification passed',
'pages.account.mjVersionSuccess': 'MJ version switch successful',
Expand Down
3 changes: 2 additions & 1 deletion src/locales/zh-CN/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ export default {
'pages.task.deleteSuccess':'删除任务成功',

'pages.account.info':'账号信息',
'pages.account.interval':'执行间隔(秒)',
'pages.account.interval':'执行前等待(秒)',
'pages.account.intervalAfter':'执行后等待(秒)',
'pages.account.cfRefresh':'重新生成 CF 验证链接',
'pages.account.cfok':'标记验证通过',
'pages.account.mjVersionSuccess':'mj版本切换成功',
Expand Down
28 changes: 27 additions & 1 deletion src/pages/AccountList/components/contents/AddContent.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
import { Card, Col, Form, FormInstance, Input, InputNumber, Row, Select, Switch } from 'antd';
import {
Card,
Col,
Form,
FormInstance,
Input,
InputNumber,
Row,
Select,
Space,
Switch,
} from 'antd';
import { useEffect, useState } from 'react';

import { allDomain } from '@/services/mj/api';
Expand Down Expand Up @@ -134,10 +145,25 @@ const AddContent = ({
>
<InputNumber min={1} />
</Form.Item>

<Form.Item label={intl.formatMessage({ id: 'pages.account.interval' })} name="interval">
<InputNumber min={1.2} />
</Form.Item>

<Form.Item label={intl.formatMessage({ id: 'pages.account.intervalAfter' })}>
<div style={{ display: 'flex', flexDirection: 'row', alignItems: 'center' }}>
<Space>
<Form.Item name="afterIntervalMin" style={{ margin: 0 }}>
<InputNumber min={1.2} placeholder="Min" />
</Form.Item>
~
<Form.Item name="afterIntervalMax" style={{ margin: 0 }}>
<InputNumber min={1.2} placeholder="Max" />
</Form.Item>
</Space>
</div>
</Form.Item>

<Form.Item label={intl.formatMessage({ id: 'pages.account.weight' })} name="weight">
<InputNumber min={1} />
</Form.Item>
Expand Down
15 changes: 15 additions & 0 deletions src/pages/AccountList/components/contents/ReconnectContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
InputNumber,
Row,
Select,
Space,
Switch,
} from 'antd';
import { useEffect, useState } from 'react';
Expand Down Expand Up @@ -150,6 +151,20 @@ const ReconnectContent = ({
<InputNumber min={1.2} />
</Form.Item>

<Form.Item label={intl.formatMessage({ id: 'pages.account.intervalAfter' })}>
<div style={{ display: 'flex', flexDirection: 'row', alignItems: 'center' }}>
<Space>
<Form.Item name="afterIntervalMin" style={{ margin: 0 }}>
<InputNumber min={1.2} placeholder="Min" />
</Form.Item>
~
<Form.Item name="afterIntervalMax" style={{ margin: 0 }}>
<InputNumber min={1.2} placeholder="Max" />
</Form.Item>
</Space>
</div>
</Form.Item>

<Form.Item label={intl.formatMessage({ id: 'pages.account.weight' })} name="weight">
<InputNumber min={1} />
</Form.Item>
Expand Down

0 comments on commit 3b25387

Please sign in to comment.