前端:任务详情展示审批/驳回记录 + 任务行 ID 不被长标题挤掉 + i18n 五语 (tsk_EmZ6vjtVbrOk)

- TaskDetail 渲染 _raw.approvals:闸名·通过/驳回 + 审批人 + 时间,
  驳回用红色边框+红底高亮块突出 reason(t.rejectReason 标签),
  通过用绿色、reason 走低调 ↳ 行;无审批记录不渲染该分区。
- 安全:reason/actor/gate 全部走 React 文本节点(默认转义),
  不经 MaestroRichDoc/innerHTML,避免同源存储型 XSS。
- TaskRow:taskid 拆为独立 flex:none span,title 加 minWidth:0,
  长标题省略号截断时 id 完整不被挤掉;ArchiveRow 同步处理保持一致。
- i18n:zh/en/es/ja/fr 五语新增 rejectReason 键。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
wangjia
2026-06-30 09:04:42 +08:00
parent e115e065e6
commit 0c1f630dca
3 changed files with 51 additions and 9 deletions
+3 -2
View File
@@ -11,9 +11,10 @@ function ArchiveRow({ item, t, onOpen }) {
borderBottom: '1px dashed var(--line-soft)',
background: hover ? 'var(--panel)' : 'transparent',
}}>
<span style={{ color: 'var(--muted)', fontWeight: 500, overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>
{item.title}<span style={{ color: 'var(--faint)', fontSize: 10.5, marginLeft: 6 }}>{item.id}</span>
<span style={{ flex: '0 1 auto', minWidth: 0, color: 'var(--muted)', fontWeight: 500, overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>
{item.title}
</span>
<span style={{ flex: 'none', color: 'var(--faint)', fontSize: 10.5 }}>{item.id}</span>
{item.subs ? <span style={{ flex: 'none', fontSize: 10.5, color: 'var(--faint)' }}>{t.archiveSubs.replace('{n}', item.subs)}</span> : null}
<span style={{ flex: 1, minWidth: 8 }}></span>
<ComplexityBadge complexity={item.cplx} />