merge: 同步 origin/ui-optimization(d224d5b6),保留 weiyuan 功能与 Semi 迁移
- 冲突以 weiyuan 功能(小程序登录、i18n 文案)为准,并保留远端 lint 重构与依赖收敛 - 删除 weiyuan 已移除、远端仅做 lint 修正的 3 个图片相关文件 - 适配远端零警告 ESLint:Monitoring/Subscription 改用 useEffectEvent,EditChannelModal 注明 t 依赖 - effect-events 单测补充 react-i18next mock - 对合并后仍不符合 Prettier 的文件做纯格式化
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