style(web): format code

This commit is contained in:
QuentinHsu
2025-04-04 12:00:38 +08:00
parent ad7a64e585
commit 775b1c458b
74 changed files with 6413 additions and 3548 deletions

View File

@@ -5,7 +5,8 @@ import {
API,
showError,
showSuccess,
showWarning, verifyJSON
showWarning,
verifyJSON,
} from '../../../helpers';
import { useTranslation } from 'react-i18next';
@@ -43,7 +44,8 @@ export default function SettingsMonitoring(props) {
if (requestQueue.length === 1) {
if (res.includes(undefined)) return;
} else if (requestQueue.length > 1) {
if (res.includes(undefined)) return showError(t('部分保存失败,请重试'));
if (res.includes(undefined))
return showError(t('部分保存失败,请重试'));
}
showSuccess(t('保存成功'));
props.refresh();
@@ -67,7 +69,7 @@ export default function SettingsMonitoring(props) {
setInputsRow(structuredClone(currentInputs));
refForm.current.setValues(currentInputs);
}, [props.options]);
return (
<>
<Spin spinning={loading}>
@@ -84,7 +86,9 @@ export default function SettingsMonitoring(props) {
step={1}
min={0}
suffix={t('秒')}
extraText={t('当运行通道全部测试时,超过此时间将自动禁用通道')}
extraText={t(
'当运行通道全部测试时,超过此时间将自动禁用通道',
)}
placeholder={''}
field={'ChannelDisableThreshold'}
onChange={(value) =>
@@ -150,10 +154,14 @@ export default function SettingsMonitoring(props) {
<Form.TextArea
label={t('自动禁用关键词')}
placeholder={t('一行一个,不区分大小写')}
extraText={t('当上游通道返回错误中包含这些关键词时(不区分大小写),自动禁用通道')}
extraText={t(
'当上游通道返回错误中包含这些关键词时(不区分大小写),自动禁用通道',
)}
field={'AutomaticDisableKeywords'}
autosize={{ minRows: 6, maxRows: 12 }}
onChange={(value) => setInputs({ ...inputs, AutomaticDisableKeywords: value })}
onChange={(value) =>
setInputs({ ...inputs, AutomaticDisableKeywords: value })
}
/>
</Col>
</Row>