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:
@@ -109,9 +109,9 @@ const statusMeta = {
|
||||
stopped: { icon: Square, tone: 'grey', label: '已停止' },
|
||||
};
|
||||
|
||||
const safeDate = (timestamp, language) => {
|
||||
const safeDate = (timestamp, locale) => {
|
||||
if (!timestamp) return '—';
|
||||
return new Intl.DateTimeFormat(language === 'en' ? 'en-US' : 'zh-CN', {
|
||||
return new Intl.DateTimeFormat(locale || undefined, {
|
||||
month: 'short',
|
||||
day: 'numeric',
|
||||
hour: '2-digit',
|
||||
@@ -1441,7 +1441,7 @@ const CloudBrain = ({ organization = false, orgId = 0, canManage = false }) => {
|
||||
expertName ? `${t('专家')}: ${expertName}` : '',
|
||||
`${t('状态')}: ${run.status}`,
|
||||
run.finished_at > 0
|
||||
? `${t('结束时间')}: ${safeDate(run.finished_at, language)}`
|
||||
? `${t('结束时间')}: ${safeDate(run.finished_at, i18n.language)}`
|
||||
: '',
|
||||
run.error_code ? `${t('错误码')}: ${run.error_code}` : '',
|
||||
reason ? `${t('失败原因')}: ${t(reason)}` : '',
|
||||
@@ -1660,12 +1660,12 @@ const CloudBrain = ({ organization = false, orgId = 0, canManage = false }) => {
|
||||
id: event.id,
|
||||
label: t(event.event_type),
|
||||
summary: summarizeRunEvent(event, t),
|
||||
time: safeDate(event.created_at, language),
|
||||
time: safeDate(event.created_at, i18n.language),
|
||||
// 同秒相邻事件不挂 "+0s":排队→开始→失败经常落在同一秒,每行都挂只是噪音。
|
||||
gap: gapSeconds > 0 ? formatDurationSeconds(gapSeconds) : '',
|
||||
};
|
||||
});
|
||||
}, [runDetail?.events, t, language]);
|
||||
}, [runDetail?.events, t, i18n.language]);
|
||||
const expertById = useMemo(
|
||||
() => new Map(experts.map((expert) => [expert.id, expert])),
|
||||
[experts],
|
||||
@@ -2251,7 +2251,7 @@ const CloudBrain = ({ organization = false, orgId = 0, canManage = false }) => {
|
||||
<StatusPill status={run.status} />
|
||||
</div>
|
||||
<p>{run.input_text}</p>
|
||||
<time>{safeDate(run.created_at, language)}</time>
|
||||
<time>{safeDate(run.created_at, i18n.language)}</time>
|
||||
</button>
|
||||
);
|
||||
})
|
||||
@@ -2285,7 +2285,9 @@ const CloudBrain = ({ organization = false, orgId = 0, canManage = false }) => {
|
||||
<h2>{t('专家任务产物')}</h2>
|
||||
<div className='brain-detail-meta'>
|
||||
<StatusPill status={activeRun.status} />
|
||||
<span>{safeDate(activeRun.created_at, language)}</span>
|
||||
<span>
|
||||
{safeDate(activeRun.created_at, i18n.language)}
|
||||
</span>
|
||||
<span>
|
||||
{t('计费状态')}: {t(activeRun.billing_status)}
|
||||
</span>
|
||||
|
||||
Reference in New Issue
Block a user