merge: 合入总仓库 weiyuan(bfdfb339) web/ 新功能,保留 ui-optimization 的 UI 重构
来源:luoguang/monkey-ai weiyuan@bfdfb339 的 web/(经 sync/main-weiyuan-web-bfdfb339 同步)
同步基准:总仓库 a2ca13cb = 本仓库初始导入 d8f3aee2
冲突处理原则:保留 ui-optimization 的 UI(样式/结构/组件),嫁接 weiyuan 的功能逻辑。
- i18n:按键三方合并;ours 的「令牌→密钥」改名键上移植 theirs 的术语修订
- task-logs / OrgLogs:ours 已手工移植同一功能(6ad95e2),保留 ours
- 删除:OrgCreate(theirs 下线 /org/create)、旧 image 组件与 VideoRegenerateModal(theirs 体验中心重写)、
OrgAvatarSection / PricingBentoPage / CommissionConsole(ours 重构中已移除)
- 测试:users-pagination 的 i18next mock 补 t();theirs 新增文件补 license header
This commit is contained in:
@@ -58,7 +58,6 @@ import {
|
||||
getQuotaPerUnit,
|
||||
collectPagedItems,
|
||||
} from '../../helpers';
|
||||
import QuotaInput from '../../components/common/ui/QuotaInput';
|
||||
import Loading from '../../components/common/ui/Loading';
|
||||
import OrgPageHeader from './components/OrgPageHeader';
|
||||
import OrgModal from './components/OrgModal';
|
||||
@@ -634,44 +633,6 @@ const OrgSettings = ({ orgId, orgRole }) => {
|
||||
</div>
|
||||
);
|
||||
|
||||
const quotaPanel = (
|
||||
<div className='oc-cs-panel'>
|
||||
<SectionHeader
|
||||
title={t('额度策略')}
|
||||
description={t('设置自助加入成员的默认额度')}
|
||||
extra={headingExtra(handleSave, loading)}
|
||||
/>
|
||||
<AntForm layout='vertical' requiredMark={false} component='div'>
|
||||
<AntForm.Item
|
||||
label={t('新成员默认额度上限')}
|
||||
extra={
|
||||
<>
|
||||
{t(
|
||||
'新成员通过企业代码自助加入时的默认个人额度上限。设置为大于 0 的值可避免企业代码泄露后被盗刷企业额度池;设置为 0 表示不限制(新成员可直接使用企业统一额度池,存在风险)。',
|
||||
)}
|
||||
{!(Number(orgInfo.default_member_quota) > 0) && (
|
||||
<span className='oc-cs-warning'>
|
||||
{t('当前为 0:新成员将不受限制地使用企业额度池')}
|
||||
</span>
|
||||
)}
|
||||
</>
|
||||
}
|
||||
>
|
||||
<QuotaInput
|
||||
value={orgInfo.default_member_quota}
|
||||
onChange={(v) =>
|
||||
setOrgInfo({ ...orgInfo, default_member_quota: v })
|
||||
}
|
||||
minQuota={0}
|
||||
style={{ width: 360, maxWidth: '100%' }}
|
||||
placeholder={t('请输入金额,0 表示不限制')}
|
||||
disabled={isSuperAdmin}
|
||||
/>
|
||||
</AntForm.Item>
|
||||
</AntForm>
|
||||
</div>
|
||||
);
|
||||
|
||||
const alertsPanel = (
|
||||
<div className='oc-cs-panel'>
|
||||
<SectionHeader
|
||||
@@ -686,10 +647,9 @@ const OrgSettings = ({ orgId, orgRole }) => {
|
||||
label={t('预警阈值')}
|
||||
extra={
|
||||
Number(alertYuan) >= 0.005 ? (
|
||||
<>
|
||||
{t('当企业剩余额度低于')} {getCurrencySymbol()}
|
||||
{Number(alertYuan).toFixed(2)} {t('时触发预警')}
|
||||
</>
|
||||
t('当企业剩余额度低于 {{amount}} 时触发预警', {
|
||||
amount: `${getCurrencySymbol()}${Number(alertYuan).toFixed(2)}`,
|
||||
})
|
||||
) : (
|
||||
t('当前为 0:已关闭余额预警')
|
||||
)
|
||||
@@ -968,11 +928,6 @@ const OrgSettings = ({ orgId, orgRole }) => {
|
||||
label: t('基本信息'),
|
||||
children: basicPanel,
|
||||
},
|
||||
(isOwner || isSuperAdmin) && {
|
||||
key: 'quota',
|
||||
label: t('额度与成员'),
|
||||
children: quotaPanel,
|
||||
},
|
||||
(isOwner || isSuperAdmin) && {
|
||||
key: 'alerts',
|
||||
label: t('通知预警'),
|
||||
|
||||
Reference in New Issue
Block a user