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
+27 -12
View File
@@ -99,7 +99,7 @@ const UserSurveyStats = ({ title, icon, t }) => {
return null;
const chartData = surveyStats.job_type_stats.map((item) => ({
name: JOB_TYPE_CONFIG[item.job_type]?.label || t('未知'),
name: t(JOB_TYPE_CONFIG[item.job_type]?.label || '未知'),
value: item.count,
percentage: item.percentage,
}));
@@ -122,7 +122,11 @@ const UserSurveyStats = ({ title, icon, t }) => {
content: [
{
key: (datum) => datum?.name,
value: (datum) => `${datum?.value || 0} ${t('人')}`,
value: (datum) =>
t('{{n}} 人', {
n: datum?.value || 0,
count: datum?.value || 0,
}),
},
{
key: () => t('占比'),
@@ -151,7 +155,7 @@ const UserSurveyStats = ({ title, icon, t }) => {
return null;
const chartData = surveyStats.ai_tool_stats.map((item) => ({
name: AI_TOOL_CONFIG[item.ai_tool_usage]?.label || t('未知'),
name: t(AI_TOOL_CONFIG[item.ai_tool_usage]?.label || '未知'),
value: item.count,
percentage: item.percentage,
}));
@@ -174,7 +178,11 @@ const UserSurveyStats = ({ title, icon, t }) => {
content: [
{
key: (datum) => datum?.name,
value: (datum) => `${datum?.value || 0} ${t('人')}`,
value: (datum) =>
t('{{n}} 人', {
n: datum?.value || 0,
count: datum?.value || 0,
}),
},
{
key: () => t('占比'),
@@ -236,7 +244,11 @@ const UserSurveyStats = ({ title, icon, t }) => {
},
{
key: () => t('新增'),
value: (datum) => `${datum?.count || 0} ${t('人')}`,
value: (datum) =>
t('{{n}} 人', {
n: datum?.count || 0,
count: datum?.count || 0,
}),
},
],
},
@@ -279,7 +291,7 @@ const UserSurveyStats = ({ title, icon, t }) => {
<>
{totalUsers > 0 && (
<Tag color='purple' size='small'>
{totalUsers} {t('人已填写')}
{t('{{n}} 人已填写', { n: totalUsers, count: totalUsers })}
</Tag>
)}
</>
@@ -394,7 +406,7 @@ const UserSurveyStats = ({ title, icon, t }) => {
{config?.icon}
</span>
<span className='text-sm text-gray-600 dark:text-gray-400'>
{config?.label}
{t(config?.label || '')}
</span>
</div>
<div className='flex items-center gap-2'>
@@ -461,7 +473,7 @@ const UserSurveyStats = ({ title, icon, t }) => {
{config?.icon}
</span>
<span className='text-sm text-gray-600 dark:text-gray-400'>
{config?.label}
{t(config?.label || '')}
</span>
</div>
<div className='flex items-center gap-2'>
@@ -549,7 +561,10 @@ const UserSurveyStats = ({ title, icon, t }) => {
{JOB_TYPE_CONFIG[item.job_type]?.icon}
</span>
<span className='text-gray-700 dark:text-gray-300'>
{JOB_TYPE_CONFIG[item.job_type]?.label}
{t(
JOB_TYPE_CONFIG[item.job_type]
?.label || '',
)}
</span>
</div>
</td>
@@ -561,10 +576,10 @@ const UserSurveyStats = ({ title, icon, t }) => {
}
size='small'
>
{
{t(
AI_TOOL_CONFIG[item.ai_tool_usage]
?.label
}
?.label || '',
)}
</Tag>
</td>
<td className='py-2 px-3 text-right font-medium'>