Commit 301c78d9 by t0ng7u

🔍 feat(edit-token): add search capability to model limit selector

Changes:
• `Form.Select` for “Model Limits” now supports in-dropdown searching (`filter` + `searchPosition='dropdown'`) enabling quick model lookup.
• Removed `maxTagCount` to display all selected models without truncation.

Benefit: simplifies selecting specific models when the list is large, improving usability during token creation/editing.
parent ac5f028d
......@@ -326,7 +326,7 @@ const SiderBar = () => {
style={{ width: isCollapsed ? '60px' : '180px' }}
>
<Nav
className="sidebar-nav custom-sidebar-nav"
className="sidebar-nav"
defaultIsCollapsed={styleState.siderCollapsed}
isCollapsed={isCollapsed}
onCollapseChange={(collapsed) => {
......
......@@ -470,26 +470,27 @@ const EditToken = (props) => {
</div>
<Row gutter={12}>
<Col span={24}>
<Form.TextArea
field='allow_ips'
label={t('IP白名单')}
placeholder={t('允许的IP,一行一个,不填写则不限制')}
autosize
rows={1}
extraText={t('请勿过度信任此功能,IP可能被伪造')}
showClear
style={{ width: '100%' }}
/>
</Col>
<Col span={24}>
<Form.Select
field='model_limits'
label={t('模型限制列表')}
placeholder={t('请选择该令牌支持的模型,留空支持所有模型')}
multiple
optionList={models}
maxTagCount={3}
extraText={t('非必要,不建议启用模型限制')}
filter
searchPosition='dropdown'
showClear
style={{ width: '100%' }}
/>
</Col>
<Col span={24}>
<Form.TextArea
field='allow_ips'
label={t('IP白名单')}
placeholder={t('允许的IP,一行一个,不填写则不限制')}
autosize
rows={1}
extraText={t('请勿过度信任此功能,IP可能被伪造')}
showClear
style={{ width: '100%' }}
/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment