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
+3 -3
View File
@@ -58,7 +58,7 @@ const ConfigManager = ({
});
} catch (error) {
Toast.error({
content: t('导出配置失败: ') + error.message,
content: t('导出配置失败: {{error}}', { error: error.message }),
duration: 3,
});
}
@@ -90,7 +90,7 @@ const ConfigManager = ({
});
} catch (error) {
Toast.error({
content: t('导入配置失败: ') + error.message,
content: t('导入配置失败: {{error}}', { error: error.message }),
duration: 3,
});
} finally {
@@ -148,7 +148,7 @@ const ConfigManager = ({
const timestamp = getConfigTimestamp();
if (timestamp) {
const date = new Date(timestamp);
return t('上次保存: ') + date.toLocaleString();
return t('上次保存: {{time}}', { time: date.toLocaleString() });
}
return t('已有保存的配置');
}
+3 -1
View File
@@ -489,7 +489,9 @@ const MessageContent = ({
className='text-red-500 text-sm p-2 bg-red-50 rounded-lg border border-red-200'
style={{ display: 'none' }}
>
图片加载失败: {imgItem.image_url.url}
{t('图片加载失败: {{url}}', {
url: imgItem.image_url.url,
})}
</div>
</div>
);
+1 -1
View File
@@ -222,7 +222,7 @@ const SSEViewer = ({ sseData }) => {
<Typography.Text strong>{t('SSE数据流')}</Typography.Text>
<Badge count={stats.total} type='primary' />
{stats.errors > 0 && (
<Badge count={`${stats.errors} ${t('错误')}`} type='danger' />
<Badge count={t('{{n}} 个错误', { n: stats.errors, count: stats.errors })} type='danger' />
)}
</div>
@@ -105,7 +105,7 @@ const ThinkingContent = ({
style={{ color: 'white' }}
className='text-xs mt-0.5 opacity-80 hidden sm:block'
>
来源: {thinkingSource}
{t('来源: {{source}}', { source: thinkingSource })}
</Typography.Text>
)}
</div>
+15 -4
View File
@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import i18next from 'i18next';
import { DEFAULT_CONFIG } from '../../constants/playground.constants';
// 存储键前缀
@@ -257,16 +258,26 @@ export const importConfig = (file) => {
resolve(importedConfig);
} else {
reject(new Error('配置文件格式无效'));
reject(new Error(i18next.t('配置文件格式无效')));
}
} catch (parseError) {
reject(new Error('解析配置文件失败: ' + parseError.message));
reject(
new Error(
i18next.t('解析配置文件失败: {{error}}', {
error: parseError.message,
}),
),
);
}
};
reader.onerror = () => reject(new Error('读取文件失败'));
reader.onerror = () => reject(new Error(i18next.t('读取文件失败')));
reader.readAsText(file);
} catch (error) {
reject(new Error('导入配置失败: ' + error.message));
reject(
new Error(
i18next.t('导入配置失败: {{error}}', { error: error.message }),
),
);
}
});
};