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:
@@ -20,6 +20,7 @@ import { useState, useCallback, useEffect, useRef } from 'react';
|
||||
import { API } from '../../helpers/api';
|
||||
import { showError } from '../../helpers';
|
||||
import { buildOrgLogFilters } from '../../helpers/orgLogFilters.js';
|
||||
import i18next from 'i18next';
|
||||
|
||||
// 获取企业X-Org-Id header
|
||||
const getOrgHeaders = (orgId) => ({
|
||||
@@ -214,7 +215,7 @@ export function useOrgPromptRecords(orgId) {
|
||||
} else {
|
||||
setRecords([]);
|
||||
setTotal(0);
|
||||
setError(res.data.message || '查询失败');
|
||||
setError(res.data.message || i18next.t('查询失败'));
|
||||
}
|
||||
} catch (err) {
|
||||
if (seq !== seqRef.current) return;
|
||||
@@ -264,7 +265,7 @@ export function useOrgMemberLogs(orgId) {
|
||||
} else {
|
||||
setLogs([]);
|
||||
setTotal(0);
|
||||
showError(res.data.message || '加载消耗明细失败');
|
||||
showError(res.data.message || i18next.t('加载消耗明细失败'));
|
||||
}
|
||||
} catch (err) {
|
||||
showError(err.message);
|
||||
@@ -316,7 +317,7 @@ export function useOrgLogsStat(orgId) {
|
||||
tpm: 0,
|
||||
has_time_range: false,
|
||||
});
|
||||
showError(res.data.message || '加载消耗统计失败');
|
||||
showError(res.data.message || i18next.t('加载消耗统计失败'));
|
||||
}
|
||||
} catch (err) {
|
||||
showError(err.message);
|
||||
@@ -352,7 +353,7 @@ export function useOrgMemberRanking(orgId) {
|
||||
setRanking(res.data.data || []);
|
||||
} else {
|
||||
setRanking([]);
|
||||
showError(res.data.message || '加载成员排行失败');
|
||||
showError(res.data.message || i18next.t('加载成员排行失败'));
|
||||
}
|
||||
} catch (err) {
|
||||
showError(err.message);
|
||||
|
||||
Reference in New Issue
Block a user