fix(ui): 统一三中心表格交互并优化企业及配套页面
- 公共表格:统一分组标签、状态开关和危险操作确认,支持防重复提交和失败重试,修复浮层触发组件的 ref 转发。 - 控制台:统一用户和渠道编辑抽屉,修正分组回填与提交格式,对齐系统设置操作区和预约列表。 - 企业中心:调整技能中心页签和窄屏布局,优化质量监控提示栏、效能分析及成本对账,统一消耗明细和审计日志筛选。 - 用户中心及公共页面:优化密钥和消费记录展示,对齐模型超市筛选,统一公开与内嵌客户端下载页。 - 同步多语言文案、组件规范与移动端视口要求。
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { toGroupList } from '@/helpers/groupList';
|
||||
import { formatIdReference } from '../../../../helpers/safeDisplay';
|
||||
|
||||
import { I18N_TECHNICAL_TEXT } from '../../../../i18n/technicalText.js';
|
||||
@@ -46,13 +47,7 @@ import SecureVerificationModal from '../../../common/modals/SecureVerificationMo
|
||||
import ChannelKeyDisplay from '../../../common/ui/ChannelKeyDisplay';
|
||||
import { useSecureVerification } from '../../../../hooks/common/useSecureVerification';
|
||||
import { createApiCalls } from '../../../../services/secureVerification';
|
||||
import {
|
||||
IconServer,
|
||||
IconSetting,
|
||||
IconCode,
|
||||
IconGlobe,
|
||||
IconBolt,
|
||||
} from '@/components/ui/icons';
|
||||
import { Code, Globe, Server, Settings, Zap } from 'lucide-react';
|
||||
|
||||
const { Text } = Typography;
|
||||
|
||||
@@ -573,11 +568,7 @@ const EditChannelModal = (props) => {
|
||||
} else {
|
||||
data.models = data.models.split(',');
|
||||
}
|
||||
if (data.group === '') {
|
||||
data.groups = [];
|
||||
} else {
|
||||
data.groups = data.group.split(',');
|
||||
}
|
||||
data.groups = toGroupList(data.group);
|
||||
if (data.model_mapping !== '') {
|
||||
data.model_mapping = JSON.stringify(
|
||||
JSON.parse(data.model_mapping),
|
||||
@@ -1575,7 +1566,7 @@ const EditChannelModal = (props) => {
|
||||
let res;
|
||||
localInputs.auto_ban = localInputs.auto_ban ? 1 : 0;
|
||||
localInputs.models = localInputs.models.join(',');
|
||||
localInputs.group = (localInputs.groups || []).join(',');
|
||||
localInputs.group = toGroupList(localInputs.groups).join(',');
|
||||
|
||||
// 日消耗限额统一使用 token(quota)单位,确保为整数
|
||||
if (localInputs.daily_quota_limit && localInputs.daily_quota_limit > 0) {
|
||||
@@ -1921,7 +1912,7 @@ const EditChannelModal = (props) => {
|
||||
{/* Header: Basic Info */}
|
||||
<div className='console-channel-section'>
|
||||
<Avatar size='small' color='blue'>
|
||||
<IconServer size={16} />
|
||||
<Server size={16} />
|
||||
</Avatar>
|
||||
<div>
|
||||
<Text className='text-lg font-medium'>
|
||||
@@ -2462,7 +2453,7 @@ const EditChannelModal = (props) => {
|
||||
onClick={handleApiConfigSecretClick}
|
||||
>
|
||||
<Avatar size='small' color='green'>
|
||||
<IconGlobe size={16} />
|
||||
<Globe size={16} />
|
||||
</Avatar>
|
||||
<div>
|
||||
<Text className='text-lg font-medium'>
|
||||
@@ -2683,7 +2674,7 @@ const EditChannelModal = (props) => {
|
||||
{/* Header: Model Config */}
|
||||
<div className='console-channel-section'>
|
||||
<Avatar size='small' color='purple'>
|
||||
<IconCode size={16} />
|
||||
<Code size={16} />
|
||||
</Avatar>
|
||||
<div>
|
||||
<Text className='text-lg font-medium'>
|
||||
@@ -2888,7 +2879,7 @@ const EditChannelModal = (props) => {
|
||||
{/* Header: Advanced Settings */}
|
||||
<div className='console-channel-section'>
|
||||
<Avatar size='small' color='orange'>
|
||||
<IconSetting size={16} />
|
||||
<Settings size={16} />
|
||||
</Avatar>
|
||||
<div>
|
||||
<Text className='text-lg font-medium'>
|
||||
@@ -3433,7 +3424,7 @@ const EditChannelModal = (props) => {
|
||||
{/* Header: Channel Extra Settings */}
|
||||
<div className='console-channel-section'>
|
||||
<Avatar size='small' color='violet'>
|
||||
<IconBolt size={16} />
|
||||
<Zap size={16} />
|
||||
</Avatar>
|
||||
<div>
|
||||
<Text className='text-lg font-medium'>
|
||||
|
||||
Reference in New Issue
Block a user