feat: 1.统一右侧抽屉关闭按钮布局 2.统一 UI 组件为 Ant Design 移除 radix-ui、floating-ui 组件 3. 修复 ESLint 文件格式错误的问题
This commit is contained in:
@@ -82,9 +82,13 @@ const OrgScopedLimitButtons = ({
|
||||
setModelModalVisible(true);
|
||||
setLoadingModels(true);
|
||||
try {
|
||||
const res = await API.get('/api/org/models', { headers: getOrgHeaders(orgId) });
|
||||
const res = await API.get('/api/org/models', {
|
||||
headers: getOrgHeaders(orgId),
|
||||
});
|
||||
if (res.data.success) {
|
||||
setOrgModels((res.data.data || []).map((m) => ({ label: m, value: m })));
|
||||
setOrgModels(
|
||||
(res.data.data || []).map((m) => ({ label: m, value: m })),
|
||||
);
|
||||
}
|
||||
} catch {
|
||||
/* ignore */
|
||||
@@ -96,7 +100,9 @@ const OrgScopedLimitButtons = ({
|
||||
setSelectedGroups(parseGroups(record?.groups));
|
||||
setGroupsModalVisible(true);
|
||||
try {
|
||||
const res = await API.get('/api/org/info', { headers: getOrgHeaders(orgId) });
|
||||
const res = await API.get('/api/org/info', {
|
||||
headers: getOrgHeaders(orgId),
|
||||
});
|
||||
if (res.data.success) {
|
||||
const org = res.data.data?.organization || {};
|
||||
let groups = [];
|
||||
@@ -122,7 +128,10 @@ const OrgScopedLimitButtons = ({
|
||||
try {
|
||||
const res = await API.put(
|
||||
`${apiBase}/${record.id}/models`,
|
||||
{ model_limits_enabled: enabled, model_limits: selectedModels.join(',') },
|
||||
{
|
||||
model_limits_enabled: enabled,
|
||||
model_limits: selectedModels.join(','),
|
||||
},
|
||||
{ headers: getOrgHeaders(orgId) },
|
||||
);
|
||||
if (res.data.success) {
|
||||
@@ -161,7 +170,12 @@ const OrgScopedLimitButtons = ({
|
||||
|
||||
return (
|
||||
<>
|
||||
<Tooltip content={t('设置该{{scope}}成员默认可用的模型范围(与成员/项目/部门限制取交集)', { scope: t(scopeLabel) })}>
|
||||
<Tooltip
|
||||
content={t(
|
||||
'设置该{{scope}}成员默认可用的模型范围(与成员/项目/部门限制取交集)',
|
||||
{ scope: t(scopeLabel) },
|
||||
)}
|
||||
>
|
||||
<Button
|
||||
{...(variant === 'link'
|
||||
? { type: 'link' }
|
||||
@@ -176,7 +190,12 @@ const OrgScopedLimitButtons = ({
|
||||
{t('模型')}
|
||||
</Button>
|
||||
</Tooltip>
|
||||
<Tooltip content={t('设置该{{scope}}成员默认可调用的分组(与成员/项目/部门限制取交集)', { scope: t(scopeLabel) })}>
|
||||
<Tooltip
|
||||
content={t(
|
||||
'设置该{{scope}}成员默认可调用的分组(与成员/项目/部门限制取交集)',
|
||||
{ scope: t(scopeLabel) },
|
||||
)}
|
||||
>
|
||||
<Button
|
||||
{...(variant === 'link'
|
||||
? { type: 'link' }
|
||||
|
||||
Reference in New Issue
Block a user