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:
qiubaishen
2026-11-10 12:01:21 +08:00
266 changed files with 38432 additions and 7570 deletions
@@ -109,7 +109,12 @@ const SettingsPaymentWechat = ({ options, refresh }) => {
for (const config of configs) {
const res = await API.put('/api/option/', config);
if (!res.data.success) {
throw new Error(`保存 ${config.key} 失败: ${res.data.message}`);
throw new Error(
t('保存 {{key}} 失败:{{message}}', {
key: config.key,
message: res.data.message,
}),
);
}
}
@@ -126,13 +131,13 @@ const SettingsPaymentWechat = ({ options, refresh }) => {
<>
<Title heading={5}>{t('微信支付配置')}</Title>
<Text type='tertiary'>
配置微信支付 Native(扫码)和 H5 支付方式。请前往{' '}
{t('配置微信支付 Native(扫码)和 H5 支付方式。请前往')}{' '}
<a
href='https://pay.weixin.qq.com'
target='_blank'
rel='noopener noreferrer'
>{t('微信支付商户平台')}</a>{' '}
获取相关配置信息。
{t('获取相关配置信息。')}
</Text>
<Divider margin='12px' />
@@ -183,14 +188,14 @@ const SettingsPaymentWechat = ({ options, refresh }) => {
field='WechatMchId'
label={t('商户号 (Mch ID)')}
placeholder={t('请输入微信支付商户号')}
rules={[{ required: true, message: '请输入商户号' }]}
rules={[{ required: true, message: t('请输入商户号') }]}
/>
<Form.Input
field='WechatAppId'
label={t('应用 ID (App ID)')}
placeholder={t('请输入微信应用 ID')}
rules={[{ required: true, message: '请输入应用 ID' }]}
rules={[{ required: true, message: t('请输入应用 ID') }]}
/>
<Form.Input
@@ -198,13 +203,13 @@ const SettingsPaymentWechat = ({ options, refresh }) => {
label={t('APIv3 密钥')}
placeholder={
options.WechatAPIv3Key === '***ALREADY_SET***'
? '已设置(留空不修改,填写新内容则更新)'
: '请输入 APIv3 密钥'
? t('已设置(留空不修改,填写新内容则更新)')
: t('请输入 APIv3 密钥')
}
mode='password'
extraText={
options.WechatAPIv3Key === '***ALREADY_SET***'
? '✓ 已配置 APIv3 密钥(留空则保持不变)'
? t('✓ 已配置 APIv3 密钥(留空则保持不变)')
: ''
}
/>
@@ -213,7 +218,7 @@ const SettingsPaymentWechat = ({ options, refresh }) => {
field='WechatSerialNo'
label={t('证书序列号')}
placeholder={t('请输入证书序列号')}
rules={[{ required: true, message: '请输入证书序列号' }]}
rules={[{ required: true, message: t('请输入证书序列号') }]}
/>
<Form.TextArea
@@ -221,14 +226,14 @@ const SettingsPaymentWechat = ({ options, refresh }) => {
label={t('商户私钥')}
placeholder={
options.WechatPrivateKey === '***ALREADY_SET***'
? '已设置(留空不修改,填写新内容则更新)'
: '请粘贴完整的 PEM 格式私钥内容(包含 -----BEGIN PRIVATE KEY----- 等)'
? t('已设置(留空不修改,填写新内容则更新)')
: t('请粘贴完整的 PEM 格式私钥内容(包含 -----BEGIN PRIVATE KEY----- 等)')
}
rows={6}
extraText={
options.WechatPrivateKey === '***ALREADY_SET***'
? '✓ 已配置商户私钥(留空则保持不变)'
: '支持直接粘贴 PEM 格式内容或填写文件路径'
? t('✓ 已配置商户私钥(留空则保持不变)')
: t('支持直接粘贴 PEM 格式内容或填写文件路径')
}
/>
@@ -236,21 +241,22 @@ const SettingsPaymentWechat = ({ options, refresh }) => {
<Title heading={6} style={{ marginTop: 16, marginBottom: 8 }}>{t('公钥模式(2024年新商户必选)')}</Title>
<Text type='tertiary' style={{ display: 'block', marginBottom: 12 }}>
2024年后注册的微信支付商户默认使用公钥模式。如果初始化失败提示"无可用的平台证书",
请从商户平台下载微信支付公钥并启用此模式。
{t(
'2024年后注册的微信支付商户默认使用公钥模式。如果初始化失败提示"无可用的平台证书",请从商户平台下载微信支付公钥并启用此模式。',
)}
</Text>
<Form.Switch
field='WechatUsePublicKey'
label={t('启用公钥模式')}
extraText='2024年新商户必须开启此选项'
extraText={t('2024年新商户必须开启此选项')}
/>
<Form.Input
field='WechatPublicKeyID'
label={t('微信支付公钥 ID')}
placeholder='PUB_KEY_ID_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
extraText='从商户平台【API安全】→【微信支付公钥】获取,格式如 PUB_KEY_ID_xxx'
extraText={t('从商户平台【API安全】→【微信支付公钥】获取,格式如 PUB_KEY_ID_xxx')}
/>
<Form.TextArea
@@ -258,14 +264,14 @@ const SettingsPaymentWechat = ({ options, refresh }) => {
label={t('微信支付公钥内容')}
placeholder={
options.WechatPublicKeyPEM === '***ALREADY_SET***'
? '已设置(留空不修改,填写新内容则更新)'
: '请粘贴完整的微信支付公钥 PEM 内容(包含 -----BEGIN PUBLIC KEY----- 等)'
? t('已设置(留空不修改,填写新内容则更新)')
: t('请粘贴完整的微信支付公钥 PEM 内容(包含 -----BEGIN PUBLIC KEY----- 等)')
}
rows={6}
extraText={
options.WechatPublicKeyPEM === '***ALREADY_SET***'
? '✓ 已配置微信支付公钥(留空则保持不变)'
: '从商户平台下载的公钥文件内容'
? t('✓ 已配置微信支付公钥(留空则保持不变)')
: t('从商户平台下载的公钥文件内容')
}
/>
@@ -277,14 +283,14 @@ const SettingsPaymentWechat = ({ options, refresh }) => {
<Form.Switch
field='WechatUseManualCert'
label={t('启用手动证书模式')}
extraText='开启后需要手动配置平台证书,关闭则使用自动下载模式(推荐)'
extraText={t('开启后需要手动配置平台证书,关闭则使用自动下载模式(推荐)')}
/>
<Form.Input
field='WechatPlatformCertPath'
label={t('平台证书文件路径')}
placeholder='/data/certs/wechatpay_platform_cert.pem'
extraText='平台证书文件的绝对路径(与下方 PEM 内容二选一)'
extraText={t('平台证书文件的绝对路径(与下方 PEM 内容二选一)')}
/>
<Form.TextArea
@@ -292,14 +298,14 @@ const SettingsPaymentWechat = ({ options, refresh }) => {
label={t('平台证书 PEM 内容')}
placeholder={
options.WechatPlatformCertPEM === '***ALREADY_SET***'
? '已设置(留空不修改,填写新内容则更新)'
: '请粘贴完整的平台证书 PEM 内容(包含 -----BEGIN CERTIFICATE----- 等)'
? t('已设置(留空不修改,填写新内容则更新)')
: t('请粘贴完整的平台证书 PEM 内容(包含 -----BEGIN CERTIFICATE----- 等)')
}
rows={6}
extraText={
options.WechatPlatformCertPEM === '***ALREADY_SET***'
? '✓ 已配置平台证书(留空则保持不变)'
: '与上方文件路径二选一,优先使用文件路径'
? t('✓ 已配置平台证书(留空则保持不变)')
: t('与上方文件路径二选一,优先使用文件路径')
}
/>
@@ -308,13 +314,13 @@ const SettingsPaymentWechat = ({ options, refresh }) => {
<Form.Switch
field='WechatNativeEnabled'
label={t('启用 Native 扫码支付')}
extraText='用户扫描二维码完成支付'
extraText={t('用户扫描二维码完成支付')}
/>
<Form.Switch
field='WechatH5Enabled'
label={t('启用 H5 支付')}
extraText='在手机浏览器中唤起微信支付'
extraText={t('在手机浏览器中唤起微信支付')}
/>
<Divider margin='12px' />
@@ -323,14 +329,14 @@ const SettingsPaymentWechat = ({ options, refresh }) => {
field='WechatNotifyUrl'
label={t('回调通知 URL')}
placeholder={t('留空则使用默认地址')}
extraText='默认: {服务器地址}/api/wechat/notify'
extraText={t('默认: {服务器地址}/api/wechat/notify')}
/>
<Form.Input
field='WechatDescription'
label={t('商品描述')}
placeholder={t('平台充值')}
extraText='显示在微信支付界面的商品描述'
extraText={t('显示在微信支付界面的商品描述')}
/>
<Form.InputNumber
@@ -338,7 +344,7 @@ const SettingsPaymentWechat = ({ options, refresh }) => {
label={t('订单过期时间(分钟)')}
min={1}
max={1440}
extraText='订单未支付的有效时间,默认 30 分钟'
extraText={t('订单未支付的有效时间,默认 30 分钟')}
/>
<Space style={{ marginTop: 20 }}>