Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b72b4f26
authored
Nov 12, 2024
by
Calcium-Ion
Committed by
GitHub
Nov 12, 2024
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #564 from Licoy/main
优化页面组件大小规格一致
parents
08d17417
af1f0a40
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
134 additions
and
116 deletions
+134
-116
common/constants.go
+6
-4
middleware/rate-limit.go
+12
-2
web/src/components/ChannelsTable.js
+0
-0
web/src/components/LogsTable.js
+16
-14
web/src/components/RedemptionsTable.js
+34
-31
web/src/components/TokensTable.js
+35
-32
web/src/components/UsersTable.js
+9
-11
web/src/pages/Setting/Operation/SettingsCreditLimit.js
+1
-1
web/src/pages/Setting/Operation/SettingsDataDashboard.js
+2
-2
web/src/pages/Setting/Operation/SettingsDrawing.js
+7
-7
web/src/pages/Setting/Operation/SettingsGeneral.js
+4
-4
web/src/pages/Setting/Operation/SettingsLog.js
+2
-2
web/src/pages/Setting/Operation/SettingsMonitoring.js
+3
-3
web/src/pages/Setting/Operation/SettingsSensitiveWords.js
+3
-3
No files found.
common/constants.go
View file @
b72b4f26
...
@@ -144,11 +144,13 @@ var (
...
@@ -144,11 +144,13 @@ var (
// All duration's unit is seconds
// All duration's unit is seconds
// Shouldn't larger then RateLimitKeyExpirationDuration
// Shouldn't larger then RateLimitKeyExpirationDuration
var
(
var
(
GlobalApiRateLimitNum
=
GetEnvOrDefault
(
"GLOBAL_API_RATE_LIMIT"
,
180
)
GlobalApiRateLimitEnable
=
GetEnvOrDefaultBool
(
"GLOBAL_API_RATE_LIMIT_ENABLE"
,
true
)
GlobalApiRateLimitDuration
int64
=
3
*
60
GlobalApiRateLimitNum
=
GetEnvOrDefault
(
"GLOBAL_API_RATE_LIMIT"
,
180
)
GlobalApiRateLimitDuration
=
int64
(
GetEnvOrDefault
(
"GLOBAL_API_RATE_LIMIT_DURATION"
,
180
))
GlobalWebRateLimitNum
=
GetEnvOrDefault
(
"GLOBAL_WEB_RATE_LIMIT"
,
60
)
GlobalWebRateLimitEnable
=
GetEnvOrDefaultBool
(
"GLOBAL_WEB_RATE_LIMIT_ENABLE"
,
true
)
GlobalWebRateLimitDuration
int64
=
3
*
60
GlobalWebRateLimitNum
=
GetEnvOrDefault
(
"GLOBAL_WEB_RATE_LIMIT"
,
60
)
GlobalWebRateLimitDuration
=
int64
(
GetEnvOrDefault
(
"GLOBAL_WEB_RATE_LIMIT_DURATION"
,
180
))
UploadRateLimitNum
=
10
UploadRateLimitNum
=
10
UploadRateLimitDuration
int64
=
60
UploadRateLimitDuration
int64
=
60
...
...
middleware/rate-limit.go
View file @
b72b4f26
...
@@ -13,6 +13,10 @@ var timeFormat = "2006-01-02T15:04:05.000Z"
...
@@ -13,6 +13,10 @@ var timeFormat = "2006-01-02T15:04:05.000Z"
var
inMemoryRateLimiter
common
.
InMemoryRateLimiter
var
inMemoryRateLimiter
common
.
InMemoryRateLimiter
var
defNext
=
func
(
c
*
gin
.
Context
)
{
c
.
Next
()
}
func
redisRateLimiter
(
c
*
gin
.
Context
,
maxRequestNum
int
,
duration
int64
,
mark
string
)
{
func
redisRateLimiter
(
c
*
gin
.
Context
,
maxRequestNum
int
,
duration
int64
,
mark
string
)
{
ctx
:=
context
.
Background
()
ctx
:=
context
.
Background
()
rdb
:=
common
.
RDB
rdb
:=
common
.
RDB
...
@@ -83,11 +87,17 @@ func rateLimitFactory(maxRequestNum int, duration int64, mark string) func(c *gi
...
@@ -83,11 +87,17 @@ func rateLimitFactory(maxRequestNum int, duration int64, mark string) func(c *gi
}
}
func
GlobalWebRateLimit
()
func
(
c
*
gin
.
Context
)
{
func
GlobalWebRateLimit
()
func
(
c
*
gin
.
Context
)
{
return
rateLimitFactory
(
common
.
GlobalWebRateLimitNum
,
common
.
GlobalWebRateLimitDuration
,
"GW"
)
if
common
.
GlobalWebRateLimitEnable
{
return
rateLimitFactory
(
common
.
GlobalWebRateLimitNum
,
common
.
GlobalWebRateLimitDuration
,
"GW"
)
}
return
defNext
}
}
func
GlobalAPIRateLimit
()
func
(
c
*
gin
.
Context
)
{
func
GlobalAPIRateLimit
()
func
(
c
*
gin
.
Context
)
{
return
rateLimitFactory
(
common
.
GlobalApiRateLimitNum
,
common
.
GlobalApiRateLimitDuration
,
"GA"
)
if
common
.
GlobalApiRateLimitEnable
{
return
rateLimitFactory
(
common
.
GlobalApiRateLimitNum
,
common
.
GlobalApiRateLimitDuration
,
"GA"
)
}
return
defNext
}
}
func
CriticalRateLimit
()
func
(
c
*
gin
.
Context
)
{
func
CriticalRateLimit
()
func
(
c
*
gin
.
Context
)
{
...
...
web/src/components/ChannelsTable.js
View file @
b72b4f26
This diff is collapsed.
Click to expand it.
web/src/components/LogsTable.js
View file @
b72b4f26
...
@@ -767,6 +767,22 @@ const LogsTable = () => {
...
@@ -767,6 +767,22 @@ const LogsTable = () => {
<
Form
.
Section
><
/Form.Section
>
<
Form
.
Section
><
/Form.Section
>
<
/
>
<
/
>
<
/Form
>
<
/Form
>
<
div
style
=
{{
marginTop
:
10
}}
>
<
Select
defaultValue
=
'0'
style
=
{{
width
:
120
}}
onChange
=
{(
value
)
=>
{
setLogType
(
parseInt
(
value
));
loadLogs
(
0
,
pageSize
,
parseInt
(
value
));
}}
>
<
Select
.
Option
value
=
'0'
>
全部
<
/Select.Option
>
<
Select
.
Option
value
=
'1'
>
充值
<
/Select.Option
>
<
Select
.
Option
value
=
'2'
>
消费
<
/Select.Option
>
<
Select
.
Option
value
=
'3'
>
管理
<
/Select.Option
>
<
Select
.
Option
value
=
'4'
>
系统
<
/Select.Option
>
<
/Select
>
<
/div
>
<
Table
<
Table
style
=
{{
marginTop
:
5
}}
style
=
{{
marginTop
:
5
}}
columns
=
{
columns
}
columns
=
{
columns
}
...
@@ -786,20 +802,6 @@ const LogsTable = () => {
...
@@ -786,20 +802,6 @@ const LogsTable = () => {
onPageChange
:
handlePageChange
,
onPageChange
:
handlePageChange
,
}}
}}
/
>
/
>
<
Select
defaultValue
=
'0'
style
=
{{
width
:
120
}}
onChange
=
{(
value
)
=>
{
setLogType
(
parseInt
(
value
));
loadLogs
(
0
,
pageSize
,
parseInt
(
value
));
}}
>
<
Select
.
Option
value
=
'0'
>
全部
<
/Select.Option
>
<
Select
.
Option
value
=
'1'
>
充值
<
/Select.Option
>
<
Select
.
Option
value
=
'2'
>
消费
<
/Select.Option
>
<
Select
.
Option
value
=
'3'
>
管理
<
/Select.Option
>
<
Select
.
Option
value
=
'4'
>
系统
<
/Select.Option
>
<
/Select
>
<
/Layout
>
<
/Layout
>
<
/
>
<
/
>
);
);
...
...
web/src/components/RedemptionsTable.js
View file @
b72b4f26
...
@@ -10,7 +10,7 @@ import {
...
@@ -10,7 +10,7 @@ import {
import
{
ITEMS_PER_PAGE
}
from
'../constants'
;
import
{
ITEMS_PER_PAGE
}
from
'../constants'
;
import
{
renderQuota
}
from
'../helpers/render'
;
import
{
renderQuota
}
from
'../helpers/render'
;
import
{
import
{
Button
,
Button
,
Divider
,
Form
,
Form
,
Modal
,
Modal
,
Popconfirm
,
Popconfirm
,
...
@@ -391,6 +391,39 @@ const RedemptionsTable = () => {
...
@@ -391,6 +391,39 @@ const RedemptionsTable = () => {
onChange
=
{
handleKeywordChange
}
onChange
=
{
handleKeywordChange
}
/
>
/
>
<
/Form
>
<
/Form
>
<
Divider
style
=
{{
margin
:
'5px 0 15px 0'
}}
/
>
<
div
>
<
Button
theme
=
'light'
type
=
'primary'
style
=
{{
marginRight
:
8
}}
onClick
=
{()
=>
{
setEditingRedemption
({
id
:
undefined
,
});
setShowEdit
(
true
);
}}
>
添加兑换码
<
/Button
>
<
Button
label
=
'复制所选兑换码'
type
=
'warning'
onClick
=
{
async
()
=>
{
if
(
selectedKeys
.
length
===
0
)
{
showError
(
'请至少选择一个兑换码!'
);
return
;
}
let
keys
=
''
;
for
(
let
i
=
0
;
i
<
selectedKeys
.
length
;
i
++
)
{
keys
+=
selectedKeys
[
i
].
name
+
' '
+
selectedKeys
[
i
].
key
+
'\n'
;
}
await
copyText
(
keys
);
}}
>
复制所选兑换码到剪贴板
<
/Button
>
<
/div
>
<
Table
<
Table
style
=
{{
marginTop
:
20
}}
style
=
{{
marginTop
:
20
}}
...
@@ -414,36 +447,6 @@ const RedemptionsTable = () => {
...
@@ -414,36 +447,6 @@ const RedemptionsTable = () => {
rowSelection
=
{
rowSelection
}
rowSelection
=
{
rowSelection
}
onRow
=
{
handleRow
}
onRow
=
{
handleRow
}
><
/Table
>
><
/Table
>
<
Button
theme
=
'light'
type
=
'primary'
style
=
{{
marginRight
:
8
}}
onClick
=
{()
=>
{
setEditingRedemption
({
id
:
undefined
,
});
setShowEdit
(
true
);
}}
>
添加兑换码
<
/Button
>
<
Button
label
=
'复制所选兑换码'
type
=
'warning'
onClick
=
{
async
()
=>
{
if
(
selectedKeys
.
length
===
0
)
{
showError
(
'请至少选择一个兑换码!'
);
return
;
}
let
keys
=
''
;
for
(
let
i
=
0
;
i
<
selectedKeys
.
length
;
i
++
)
{
keys
+=
selectedKeys
[
i
].
name
+
' '
+
selectedKeys
[
i
].
key
+
'\n'
;
}
await
copyText
(
keys
);
}}
>
复制所选兑换码到剪贴板
<
/Button
>
<
/
>
<
/
>
);
);
};
};
...
...
web/src/components/TokensTable.js
View file @
b72b4f26
...
@@ -10,7 +10,7 @@ import {
...
@@ -10,7 +10,7 @@ import {
import
{
ITEMS_PER_PAGE
}
from
'../constants'
;
import
{
ITEMS_PER_PAGE
}
from
'../constants'
;
import
{
renderGroup
,
renderQuota
}
from
'../helpers/render'
;
import
{
renderGroup
,
renderQuota
}
from
'../helpers/render'
;
import
{
import
{
Button
,
Button
,
Divider
,
Dropdown
,
Dropdown
,
Form
,
Form
,
Modal
,
Modal
,
...
@@ -596,6 +596,40 @@ const TokensTable = () => {
...
@@ -596,6 +596,40 @@ const TokensTable = () => {
查询
查询
<
/Button
>
<
/Button
>
<
/Form
>
<
/Form
>
<
Divider
style
=
{{
margin
:
'15px 0'
}}
/
>
<
div
>
<
Button
theme
=
'light'
type
=
'primary'
style
=
{{
marginRight
:
8
}}
onClick
=
{()
=>
{
setEditingToken
({
id
:
undefined
,
});
setShowEdit
(
true
);
}}
>
添加令牌
<
/Button
>
<
Button
label
=
'复制所选令牌'
type
=
'warning'
onClick
=
{
async
()
=>
{
if
(
selectedKeys
.
length
===
0
)
{
showError
(
'请至少选择一个令牌!'
);
return
;
}
let
keys
=
''
;
for
(
let
i
=
0
;
i
<
selectedKeys
.
length
;
i
++
)
{
keys
+=
selectedKeys
[
i
].
name
+
' sk-'
+
selectedKeys
[
i
].
key
+
'\n'
;
}
await
copyText
(
keys
);
}}
>
复制所选令牌到剪贴板
<
/Button
>
<
/div
>
<
Table
<
Table
style
=
{{
marginTop
:
20
}}
style
=
{{
marginTop
:
20
}}
...
@@ -619,37 +653,6 @@ const TokensTable = () => {
...
@@ -619,37 +653,6 @@ const TokensTable = () => {
rowSelection
=
{
rowSelection
}
rowSelection
=
{
rowSelection
}
onRow
=
{
handleRow
}
onRow
=
{
handleRow
}
><
/Table
>
><
/Table
>
<
Button
theme
=
'light'
type
=
'primary'
style
=
{{
marginRight
:
8
}}
onClick
=
{()
=>
{
setEditingToken
({
id
:
undefined
,
});
setShowEdit
(
true
);
}}
>
添加令牌
<
/Button
>
<
Button
label
=
'复制所选令牌'
type
=
'warning'
onClick
=
{
async
()
=>
{
if
(
selectedKeys
.
length
===
0
)
{
showError
(
'请至少选择一个令牌!'
);
return
;
}
let
keys
=
''
;
for
(
let
i
=
0
;
i
<
selectedKeys
.
length
;
i
++
)
{
keys
+=
selectedKeys
[
i
].
name
+
' sk-'
+
selectedKeys
[
i
].
key
+
'\n'
;
}
await
copyText
(
keys
);
}}
>
复制所选令牌到剪贴板
<
/Button
>
<
/
>
<
/
>
);
);
};
};
...
...
web/src/components/UsersTable.js
View file @
b72b4f26
...
@@ -476,10 +476,18 @@ const UsersTable = () => {
...
@@ -476,10 +476,18 @@ const UsersTable = () => {
type
=
'primary'
type
=
'primary'
htmlType
=
'submit'
htmlType
=
'submit'
className
=
'btn-margin-right'
className
=
'btn-margin-right'
style
=
{{
marginRight
:
8
}}
>
>
查询
查询
<
/Button
>
<
/Button
>
<
Button
theme
=
'light'
type
=
'primary'
onClick
=
{()
=>
{
setShowAddUser
(
true
);
}}
>
添加用户
<
/Button
>
<
/Space
>
<
/Space
>
<
/div
>
<
/div
>
<
/Form
>
<
/Form
>
...
@@ -496,16 +504,6 @@ const UsersTable = () => {
...
@@ -496,16 +504,6 @@ const UsersTable = () => {
}}
}}
loading
=
{
loading
}
loading
=
{
loading
}
/
>
/
>
<
Button
theme
=
'light'
type
=
'primary'
style
=
{{
marginRight
:
8
}}
onClick
=
{()
=>
{
setShowAddUser
(
true
);
}}
>
添加用户
<
/Button
>
<
/
>
<
/
>
);
);
};
};
...
...
web/src/pages/Setting/Operation/SettingsCreditLimit.js
View file @
b72b4f26
...
@@ -144,7 +144,7 @@ export default function SettingsCreditLimit(props) {
...
@@ -144,7 +144,7 @@ export default function SettingsCreditLimit(props) {
<
/Row
>
<
/Row
>
<
Row
>
<
Row
>
<
Button
size
=
'
large
'
onClick
=
{
onSubmit
}
>
<
Button
size
=
'
default
'
onClick
=
{
onSubmit
}
>
保存额度设置
保存额度设置
<
/Button
>
<
/Button
>
<
/Row
>
<
/Row
>
...
...
web/src/pages/Setting/Operation/SettingsDataDashboard.js
View file @
b72b4f26
...
@@ -87,7 +87,7 @@ export default function DataDashboard(props) {
...
@@ -87,7 +87,7 @@ export default function DataDashboard(props) {
<
Form
.
Switch
<
Form
.
Switch
field
=
{
'DataExportEnabled'
}
field
=
{
'DataExportEnabled'
}
label
=
{
'启用数据看板(实验性)'
}
label
=
{
'启用数据看板(实验性)'
}
size
=
'
large
'
size
=
'
default
'
checkedText
=
'|'
checkedText
=
'|'
uncheckedText
=
'〇'
uncheckedText
=
'〇'
onChange
=
{(
value
)
=>
{
onChange
=
{(
value
)
=>
{
...
@@ -135,7 +135,7 @@ export default function DataDashboard(props) {
...
@@ -135,7 +135,7 @@ export default function DataDashboard(props) {
<
/Col
>
<
/Col
>
<
/Row
>
<
/Row
>
<
Row
>
<
Row
>
<
Button
size
=
'
large
'
onClick
=
{
onSubmit
}
>
<
Button
size
=
'
default
'
onClick
=
{
onSubmit
}
>
保存数据看板设置
保存数据看板设置
<
/Button
>
<
/Button
>
<
/Row
>
<
/Row
>
...
...
web/src/pages/Setting/Operation/SettingsDrawing.js
View file @
b72b4f26
...
@@ -81,7 +81,7 @@ export default function SettingsDrawing(props) {
...
@@ -81,7 +81,7 @@ export default function SettingsDrawing(props) {
<
Form
.
Switch
<
Form
.
Switch
field
=
{
'DrawingEnabled'
}
field
=
{
'DrawingEnabled'
}
label
=
{
'启用绘图功能'
}
label
=
{
'启用绘图功能'
}
size
=
'
large
'
size
=
'
default
'
checkedText
=
'|'
checkedText
=
'|'
uncheckedText
=
'〇'
uncheckedText
=
'〇'
onChange
=
{(
value
)
=>
{
onChange
=
{(
value
)
=>
{
...
@@ -96,7 +96,7 @@ export default function SettingsDrawing(props) {
...
@@ -96,7 +96,7 @@ export default function SettingsDrawing(props) {
<
Form
.
Switch
<
Form
.
Switch
field
=
{
'MjNotifyEnabled'
}
field
=
{
'MjNotifyEnabled'
}
label
=
{
'允许回调(会泄露服务器 IP 地址)'
}
label
=
{
'允许回调(会泄露服务器 IP 地址)'
}
size
=
'
large
'
size
=
'
default
'
checkedText
=
'|'
checkedText
=
'|'
uncheckedText
=
'〇'
uncheckedText
=
'〇'
onChange
=
{(
value
)
=>
onChange
=
{(
value
)
=>
...
@@ -111,7 +111,7 @@ export default function SettingsDrawing(props) {
...
@@ -111,7 +111,7 @@ export default function SettingsDrawing(props) {
<
Form
.
Switch
<
Form
.
Switch
field
=
{
'MjAccountFilterEnabled'
}
field
=
{
'MjAccountFilterEnabled'
}
label
=
{
'允许 AccountFilter 参数'
}
label
=
{
'允许 AccountFilter 参数'
}
size
=
'
large
'
size
=
'
default
'
checkedText
=
'|'
checkedText
=
'|'
uncheckedText
=
'〇'
uncheckedText
=
'〇'
onChange
=
{(
value
)
=>
onChange
=
{(
value
)
=>
...
@@ -126,7 +126,7 @@ export default function SettingsDrawing(props) {
...
@@ -126,7 +126,7 @@ export default function SettingsDrawing(props) {
<
Form
.
Switch
<
Form
.
Switch
field
=
{
'MjForwardUrlEnabled'
}
field
=
{
'MjForwardUrlEnabled'
}
label
=
{
'开启之后将上游地址替换为服务器地址'
}
label
=
{
'开启之后将上游地址替换为服务器地址'
}
size
=
'
large
'
size
=
'
default
'
checkedText
=
'|'
checkedText
=
'|'
uncheckedText
=
'〇'
uncheckedText
=
'〇'
onChange
=
{(
value
)
=>
onChange
=
{(
value
)
=>
...
@@ -146,7 +146,7 @@ export default function SettingsDrawing(props) {
...
@@ -146,7 +146,7 @@ export default function SettingsDrawing(props) {
<
Tag
>--
relax
<
/Tag> 以及 <Tag>--turbo</
Tag
>
参数
<
Tag
>--
relax
<
/Tag> 以及 <Tag>--turbo</
Tag
>
参数
<
/
>
<
/
>
}
}
size
=
'
large
'
size
=
'
default
'
checkedText
=
'|'
checkedText
=
'|'
uncheckedText
=
'〇'
uncheckedText
=
'〇'
onChange
=
{(
value
)
=>
onChange
=
{(
value
)
=>
...
@@ -165,7 +165,7 @@ export default function SettingsDrawing(props) {
...
@@ -165,7 +165,7 @@ export default function SettingsDrawing(props) {
检测必须等待绘图成功才能进行放大等操作
检测必须等待绘图成功才能进行放大等操作
<
/
>
<
/
>
}
}
size
=
'
large
'
size
=
'
default
'
checkedText
=
'|'
checkedText
=
'|'
uncheckedText
=
'〇'
uncheckedText
=
'〇'
onChange
=
{(
value
)
=>
onChange
=
{(
value
)
=>
...
@@ -178,7 +178,7 @@ export default function SettingsDrawing(props) {
...
@@ -178,7 +178,7 @@ export default function SettingsDrawing(props) {
<
/Col
>
<
/Col
>
<
/Row
>
<
/Row
>
<
Row
>
<
Row
>
<
Button
size
=
'
large
'
onClick
=
{
onSubmit
}
>
<
Button
size
=
'
default
'
onClick
=
{
onSubmit
}
>
保存绘图设置
保存绘图设置
<
/Button
>
<
/Button
>
<
/Row
>
<
/Row
>
...
...
web/src/pages/Setting/Operation/SettingsGeneral.js
View file @
b72b4f26
...
@@ -141,7 +141,7 @@ export default function GeneralSettings(props) {
...
@@ -141,7 +141,7 @@ export default function GeneralSettings(props) {
<
Form
.
Switch
<
Form
.
Switch
field
=
{
'DisplayInCurrencyEnabled'
}
field
=
{
'DisplayInCurrencyEnabled'
}
label
=
{
'以货币形式显示额度'
}
label
=
{
'以货币形式显示额度'
}
size
=
'
large
'
size
=
'
default
'
checkedText
=
'|'
checkedText
=
'|'
uncheckedText
=
'〇'
uncheckedText
=
'〇'
onChange
=
{(
value
)
=>
{
onChange
=
{(
value
)
=>
{
...
@@ -156,7 +156,7 @@ export default function GeneralSettings(props) {
...
@@ -156,7 +156,7 @@ export default function GeneralSettings(props) {
<
Form
.
Switch
<
Form
.
Switch
field
=
{
'DisplayTokenStatEnabled'
}
field
=
{
'DisplayTokenStatEnabled'
}
label
=
{
'Billing 相关 API 显示令牌额度而非用户额度'
}
label
=
{
'Billing 相关 API 显示令牌额度而非用户额度'
}
size
=
'
large
'
size
=
'
default
'
checkedText
=
'|'
checkedText
=
'|'
uncheckedText
=
'〇'
uncheckedText
=
'〇'
onChange
=
{(
value
)
=>
onChange
=
{(
value
)
=>
...
@@ -171,7 +171,7 @@ export default function GeneralSettings(props) {
...
@@ -171,7 +171,7 @@ export default function GeneralSettings(props) {
<
Form
.
Switch
<
Form
.
Switch
field
=
{
'DefaultCollapseSidebar'
}
field
=
{
'DefaultCollapseSidebar'
}
label
=
{
'默认折叠侧边栏'
}
label
=
{
'默认折叠侧边栏'
}
size
=
'
large
'
size
=
'
default
'
checkedText
=
'|'
checkedText
=
'|'
uncheckedText
=
'〇'
uncheckedText
=
'〇'
onChange
=
{(
value
)
=>
onChange
=
{(
value
)
=>
...
@@ -184,7 +184,7 @@ export default function GeneralSettings(props) {
...
@@ -184,7 +184,7 @@ export default function GeneralSettings(props) {
<
/Col
>
<
/Col
>
<
/Row
>
<
/Row
>
<
Row
>
<
Row
>
<
Button
size
=
'
large
'
onClick
=
{
onSubmit
}
>
<
Button
size
=
'
default
'
onClick
=
{
onSubmit
}
>
保存通用设置
保存通用设置
<
/Button
>
<
/Button
>
<
/Row
>
<
/Row
>
...
...
web/src/pages/Setting/Operation/SettingsLog.js
View file @
b72b4f26
...
@@ -102,7 +102,7 @@ export default function SettingsLog(props) {
...
@@ -102,7 +102,7 @@ export default function SettingsLog(props) {
<
Form
.
Switch
<
Form
.
Switch
field
=
{
'LogConsumeEnabled'
}
field
=
{
'LogConsumeEnabled'
}
label
=
{
'启用额度消费日志记录'
}
label
=
{
'启用额度消费日志记录'
}
size
=
'
large
'
size
=
'
default
'
checkedText
=
'|'
checkedText
=
'|'
uncheckedText
=
'〇'
uncheckedText
=
'〇'
onChange
=
{(
value
)
=>
{
onChange
=
{(
value
)
=>
{
...
@@ -135,7 +135,7 @@ export default function SettingsLog(props) {
...
@@ -135,7 +135,7 @@ export default function SettingsLog(props) {
<
/Row
>
<
/Row
>
<
Row
>
<
Row
>
<
Button
size
=
'
large
'
onClick
=
{
onSubmit
}
>
<
Button
size
=
'
default
'
onClick
=
{
onSubmit
}
>
保存日志设置
保存日志设置
<
/Button
>
<
/Button
>
<
/Row
>
<
/Row
>
...
...
web/src/pages/Setting/Operation/SettingsMonitoring.js
View file @
b72b4f26
...
@@ -114,7 +114,7 @@ export default function SettingsMonitoring(props) {
...
@@ -114,7 +114,7 @@ export default function SettingsMonitoring(props) {
<
Form
.
Switch
<
Form
.
Switch
field
=
{
'AutomaticDisableChannelEnabled'
}
field
=
{
'AutomaticDisableChannelEnabled'
}
label
=
{
'失败时自动禁用通道'
}
label
=
{
'失败时自动禁用通道'
}
size
=
'
large
'
size
=
'
default
'
checkedText
=
'|'
checkedText
=
'|'
uncheckedText
=
'〇'
uncheckedText
=
'〇'
onChange
=
{(
value
)
=>
{
onChange
=
{(
value
)
=>
{
...
@@ -129,7 +129,7 @@ export default function SettingsMonitoring(props) {
...
@@ -129,7 +129,7 @@ export default function SettingsMonitoring(props) {
<
Form
.
Switch
<
Form
.
Switch
field
=
{
'AutomaticEnableChannelEnabled'
}
field
=
{
'AutomaticEnableChannelEnabled'
}
label
=
{
'成功时自动启用通道'
}
label
=
{
'成功时自动启用通道'
}
size
=
'
large
'
size
=
'
default
'
checkedText
=
'|'
checkedText
=
'|'
uncheckedText
=
'〇'
uncheckedText
=
'〇'
onChange
=
{(
value
)
=>
onChange
=
{(
value
)
=>
...
@@ -142,7 +142,7 @@ export default function SettingsMonitoring(props) {
...
@@ -142,7 +142,7 @@ export default function SettingsMonitoring(props) {
<
/Col
>
<
/Col
>
<
/Row
>
<
/Row
>
<
Row
>
<
Row
>
<
Button
size
=
'
large
'
onClick
=
{
onSubmit
}
>
<
Button
size
=
'
default
'
onClick
=
{
onSubmit
}
>
保存监控设置
保存监控设置
<
/Button
>
<
/Button
>
<
/Row
>
<
/Row
>
...
...
web/src/pages/Setting/Operation/SettingsSensitiveWords.js
View file @
b72b4f26
...
@@ -77,7 +77,7 @@ export default function SettingsSensitiveWords(props) {
...
@@ -77,7 +77,7 @@ export default function SettingsSensitiveWords(props) {
<
Form
.
Switch
<
Form
.
Switch
field
=
{
'CheckSensitiveEnabled'
}
field
=
{
'CheckSensitiveEnabled'
}
label
=
{
'启用屏蔽词过滤功能'
}
label
=
{
'启用屏蔽词过滤功能'
}
size
=
'
large
'
size
=
'
default
'
checkedText
=
'|'
checkedText
=
'|'
uncheckedText
=
'〇'
uncheckedText
=
'〇'
onChange
=
{(
value
)
=>
{
onChange
=
{(
value
)
=>
{
...
@@ -92,7 +92,7 @@ export default function SettingsSensitiveWords(props) {
...
@@ -92,7 +92,7 @@ export default function SettingsSensitiveWords(props) {
<
Form
.
Switch
<
Form
.
Switch
field
=
{
'CheckSensitiveOnPromptEnabled'
}
field
=
{
'CheckSensitiveOnPromptEnabled'
}
label
=
{
'启用 Prompt 检查'
}
label
=
{
'启用 Prompt 检查'
}
size
=
'
large
'
size
=
'
default
'
checkedText
=
'|'
checkedText
=
'|'
uncheckedText
=
'〇'
uncheckedText
=
'〇'
onChange
=
{(
value
)
=>
onChange
=
{(
value
)
=>
...
@@ -123,7 +123,7 @@ export default function SettingsSensitiveWords(props) {
...
@@ -123,7 +123,7 @@ export default function SettingsSensitiveWords(props) {
<
/Col
>
<
/Col
>
<
/Row
>
<
/Row
>
<
Row
>
<
Row
>
<
Button
size
=
'
large
'
onClick
=
{
onSubmit
}
>
<
Button
size
=
'
default
'
onClick
=
{
onSubmit
}
>
保存屏蔽词过滤设置
保存屏蔽词过滤设置
<
/Button
>
<
/Button
>
<
/Row
>
<
/Row
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment