Skip to content

Commit

Permalink
limit access from service
Browse files Browse the repository at this point in the history
  • Loading branch information
Karlatemp committed Jul 28, 2024
1 parent d142296 commit 3b686c7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/locale/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"settings.color.tooltip": "根据主题颜色生成的 10 个梯度色(将配置复制到项目中,主题色才能对亮色 / 暗黑模式同时生效)",
"personal.settings.security": "安全设置",
"yggdrasil.service.is-enabled": "是否开启",
"yggdrasil.service.is-limited": "限制登入",
"yggdrasil.service.comment": "备注",
"yggdrasil.service.connectionTimeout": "连接超时时间(ms)",
"yggdrasil.service.connectionTimeout.incorrect": "需要为自然数",
Expand Down
16 changes: 16 additions & 0 deletions src/pages/yggdrasil/services/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,15 @@ function ServiceEditor({data, reloadServices}) {
>
<Switch/>
</Form.Item>
<Form.Item
label={t('yggdrasil.service.is-limited')}
required
field="limited"
rules={[{required: true}]}
triggerPropName={'checked'}
>
<Switch/>
</Form.Item>
<Form.Item
label={t('yggdrasil.service.connectionTimeout')}
required
Expand Down Expand Up @@ -181,6 +190,13 @@ function Services() {
return a ? <IconCheck/> : <IconClose/>
},
},
{
title: t('yggdrasil.service.is-limited'),
dataIndex: 'limited',
render(a) {
return a ? <IconCheck/> : <IconClose/>
},
},
{
title: t('yggdrasil.service.connectionTimeout'),
dataIndex: 'connectionTimeout'
Expand Down

0 comments on commit 3b686c7

Please sign in to comment.