chore: update copy

This commit is contained in:
JustSong
2024-03-24 23:01:03 +08:00
parent 5b349efff9
commit 24be9de098
11 changed files with 60 additions and 60 deletions

View File

@@ -437,7 +437,7 @@ const ChannelsTable = () => {
if (success) {
record.response_time = time * 1000;
record.test_time = Date.now() / 1000;
showInfo(`${record.name} 测试成功,耗时 ${time.toFixed(2)} 秒。`);
showInfo(`${record.name} 测试成功,耗时 ${time.toFixed(2)} 秒。`);
} else {
showError(message);
}
@@ -447,7 +447,7 @@ const ChannelsTable = () => {
const res = await API.get(`/api/channel/test?scope=${scope}`);
const { success, message } = res.data;
if (success) {
showInfo('已成功开始测试道,请刷新页面查看结果。');
showInfo('已成功开始测试道,请刷新页面查看结果。');
} else {
showError(message);
}
@@ -470,7 +470,7 @@ const ChannelsTable = () => {
if (success) {
record.balance = balance;
record.balance_updated_time = Date.now() / 1000;
showInfo(`${record.name} 余额更新成功!`);
showInfo(`${record.name} 余额更新成功!`);
} else {
showError(message);
}
@@ -481,7 +481,7 @@ const ChannelsTable = () => {
const res = await API.get(`/api/channel/update_balance`);
const { success, message } = res.data;
if (success) {
showInfo('已更新完毕所有已启用道余额!');
showInfo('已更新完毕所有已启用道余额!');
} else {
showError(message);
}
@@ -490,7 +490,7 @@ const ChannelsTable = () => {
const batchDeleteChannels = async () => {
if (selectedChannels.length === 0) {
showError('请先选择要删除的道!');
showError('请先选择要删除的道!');
return;
}
setLoading(true);
@@ -501,7 +501,7 @@ const ChannelsTable = () => {
const res = await API.post(`/api/channel/batch`, { ids: ids });
const { success, message, data } = res.data;
if (success) {
showSuccess(`已删除 ${data}道!`);
showSuccess(`已删除 ${data}道!`);
await refresh();
} else {
showError(message);
@@ -513,7 +513,7 @@ const ChannelsTable = () => {
const res = await API.post(`/api/channel/fix`);
const { success, message, data } = res.data;
if (success) {
showSuccess(`已修复 ${data}道!`);
showSuccess(`已修复 ${data}道!`);
await refresh();
} else {
showError(message);
@@ -633,7 +633,7 @@ const ChannelsTable = () => {
onConfirm={() => { testChannels("all") }}
position={isMobile() ? 'top' : 'left'}
>
<Button theme="light" type="warning" style={{ marginRight: 8 }}>测试所有</Button>
<Button theme="light" type="warning" style={{ marginRight: 8 }}>测试所有</Button>
</Popconfirm>
<Popconfirm
title="确定?"
@@ -648,16 +648,16 @@ const ChannelsTable = () => {
okType={'secondary'}
onConfirm={updateAllChannelsBalance}
>
<Button theme="light" type="secondary" style={{ marginRight: 8 }}>更新所有已启用道余额</Button>
<Button theme="light" type="secondary" style={{ marginRight: 8 }}>更新所有已启用道余额</Button>
</Popconfirm> */}
<Popconfirm
title="确定是否要删除禁用道?"
title="确定是否要删除禁用道?"
content="此修改将不可逆"
okType={'danger'}
onConfirm={deleteAllDisabledChannels}
position={isMobile() ? 'top' : 'left'}
>
<Button theme="light" type="danger" style={{ marginRight: 8 }}>删除禁用</Button>
<Button theme="light" type="danger" style={{ marginRight: 8 }}>删除禁用</Button>
</Popconfirm>
<Button theme="light" type="primary" style={{ marginRight: 8 }} onClick={refresh}>刷新</Button>
@@ -673,7 +673,7 @@ const ChannelsTable = () => {
setEnableBatchDelete(v);
}}></Switch>
<Popconfirm
title="确定是否要删除所选道?"
title="确定是否要删除所选道?"
content="此修改将不可逆"
okType={'danger'}
onConfirm={batchDeleteChannels}
@@ -681,7 +681,7 @@ const ChannelsTable = () => {
position={'top'}
>
<Button disabled={!enableBatchDelete} theme="light" type="danger"
style={{ marginRight: 8 }}>删除所选道</Button>
style={{ marginRight: 8 }}>删除所选道</Button>
</Popconfirm>
<Popconfirm
title="确定是否要修复数据库一致性?"

View File

@@ -261,7 +261,7 @@ const OperationSetting = () => {
value={inputs.ChannelDisableThreshold}
type='number'
min='0'
placeholder='单位秒,当运行道全部测试时,超过此时间将自动禁用道'
placeholder='单位秒,当运行道全部测试时,超过此时间将自动禁用道'
/>
<Form.Input
label='额度提醒阈值'
@@ -277,13 +277,13 @@ const OperationSetting = () => {
<Form.Group inline>
<Form.Checkbox
checked={inputs.AutomaticDisableChannelEnabled === 'true'}
label='失败时自动禁用道'
label='失败时自动禁用道'
name='AutomaticDisableChannelEnabled'
onChange={handleInputChange}
/>
<Form.Checkbox
checked={inputs.AutomaticEnableChannelEnabled === 'true'}
label='成功时自动启用道'
label='成功时自动启用道'
name='AutomaticEnableChannelEnabled'
onChange={handleInputChange}
/>