mirror of
https://github.com/ThearchyHelios/AgentLab.git
synced 2026-11-15 19:12:00 +00:00
数据目录阶段 1C:check-catalog 覆盖清单筛选排序、起草分批与停止、单项审阅、批量确认、编辑即确认、409、空状态与导入表格说明;页头标题放不下时截断,弹层去掉重复的读屏标签
This commit is contained in:
@@ -1597,8 +1597,9 @@ export function PageHeader({ icon, title, subtitle, actions }: {
|
||||
<span className="flex h-6 w-6 shrink-0 items-center justify-center rounded-md border bg-elev text-dim" aria-hidden>
|
||||
{icon}
|
||||
</span>
|
||||
<h1 className="shrink-0 text-sm font-semibold">{title}</h1>
|
||||
{subtitle && <p className="min-w-0 truncate text-xs text-faint" title={subtitle}>{subtitle}</p>}
|
||||
{/* 放不下时先收说明(shrink 权重大得多),说明收没了标题再截断,不把整行撑出视口 */}
|
||||
<h1 className="min-w-0 truncate text-sm font-semibold" title={title}>{title}</h1>
|
||||
{subtitle && <p className="min-w-0 shrink-[1000] truncate text-xs text-faint" title={subtitle}>{subtitle}</p>}
|
||||
<span className="flex-1" />
|
||||
{actions}
|
||||
</header>
|
||||
|
||||
@@ -104,6 +104,12 @@ export function CatalogPage() {
|
||||
<Sparkles size={11} aria-hidden /> {CT.draft}
|
||||
</button>
|
||||
)
|
||||
// 页头的「起草」窄屏只留图标,标题才放得下
|
||||
const headerDraft = (
|
||||
<button type="button" className="btn btn-sm" onClick={() => setDrafting(true)} aria-label={CT.draft} title={CT.draft} data-catalog-draft="">
|
||||
<Sparkles size={11} aria-hidden /> <span className="hidden sm:inline">{CT.draft}</span>
|
||||
</button>
|
||||
)
|
||||
|
||||
let body: ReactNode
|
||||
if (!data) {
|
||||
@@ -175,7 +181,7 @@ export function CatalogPage() {
|
||||
subtitle={CT.subtitle}
|
||||
actions={(
|
||||
<div className="flex shrink-0 items-center gap-1.5">
|
||||
{hasTables && draftButton()}
|
||||
{hasTables && headerDraft}
|
||||
<button type="button" className="btn btn-sm btn-ghost" onClick={() => navigate(back)} aria-label={CT.back} data-catalog-back="">
|
||||
<ArrowLeft size={12} aria-hidden /> <span className="hidden sm:inline">{CT.back}</span>
|
||||
</button>
|
||||
|
||||
@@ -248,31 +248,15 @@ export function ItemMark({ target, compact = false, disabled = false, onReview }
|
||||
data-item-panel={target.path}
|
||||
>
|
||||
<div id={titleId} className="font-medium text-fg">{CT.itemTitle(target.where)}</div>
|
||||
<dl className="mt-2 space-y-1.5 text-2xs leading-relaxed">
|
||||
<div className="flex items-start gap-2">
|
||||
<dt className="sr-only">状态</dt>
|
||||
<dd className="flex min-w-0 flex-wrap items-center gap-1.5">
|
||||
<StatusChip status={status} />
|
||||
<span className="text-dim">{CATALOG_STATUS_HINT[status]}</span>
|
||||
</dd>
|
||||
</div>
|
||||
<div className="flex gap-2 text-dim">
|
||||
<dt className="sr-only">来源</dt>
|
||||
<dd>{CT.itemSource(CATALOG_SOURCE_LABEL[source])}</dd>
|
||||
</div>
|
||||
{target.updated_at && (
|
||||
<div className="flex gap-2 text-faint">
|
||||
<dt className="sr-only">更新时间</dt>
|
||||
<dd className="tnum">{CT.itemUpdated(formatDateTime(target.updated_at))}</dd>
|
||||
</div>
|
||||
)}
|
||||
{target.note && (
|
||||
<div className="rounded border bg-bg px-2 py-1 text-dim">
|
||||
<dt className="sr-only">备注</dt>
|
||||
<dd className="whitespace-pre-wrap break-words">{target.note}</dd>
|
||||
</div>
|
||||
)}
|
||||
</dl>
|
||||
<div className="mt-2 space-y-1.5 text-2xs leading-relaxed">
|
||||
<p className="flex min-w-0 flex-wrap items-center gap-1.5">
|
||||
<StatusChip status={status} />
|
||||
<span className="text-dim">{CATALOG_STATUS_HINT[status]}</span>
|
||||
</p>
|
||||
<p className="text-dim">{CT.itemSource(CATALOG_SOURCE_LABEL[source])}</p>
|
||||
{target.updated_at && <p className="tnum text-faint">{CT.itemUpdated(formatDateTime(target.updated_at))}</p>}
|
||||
{target.note && <p className="whitespace-pre-wrap break-words rounded border bg-bg px-2 py-1 text-dim">{target.note}</p>}
|
||||
</div>
|
||||
<div className="mt-3 flex flex-wrap gap-1.5">
|
||||
<ActionButton icon={<Check size={11} />} disabled={disabled || status === 'confirmed'} onClick={() => act('confirm')} action="confirm">
|
||||
{CT.confirm}
|
||||
|
||||
Reference in New Issue
Block a user