ui: dialogs vertically centered (my-auto, no top-clipping), record title promoted as emphasized heading in detail

This commit is contained in:
root
2026-10-17 11:18:25 +08:00
parent a0aa77dfda
commit e0fcca75b1
15 changed files with 25 additions and 22 deletions
@@ -112,7 +112,7 @@ export function RecordDetailDialog({ open, onClose, footprintId, onEdit }: {
open={open}
onClose={onClose}
width={680}
title={d ? d.title : '记录详情'}
title="记录详情"
footer={
d ? (
<>
@@ -131,8 +131,10 @@ export function RecordDetailDialog({ open, onClose, footprintId, onEdit }: {
<div className="py-10 text-center text-[13px] text-ink-3">加载中…</div>
) : (
<div className="flex flex-col gap-4">
{/* 徽章行:类型 · 级别 · 奖等 · 角色 · 状态 · 名次 */}
<div className="flex flex-wrap items-center gap-1.5">
{/* 标题强调 */}
<div>
<h2 className="text-[20px] font-bold leading-tight tracking-tight text-ink-1" style={{ textWrap: 'balance' }}>{d.title}</h2>
<div className="mt-2.5 flex flex-wrap items-center gap-1.5">
<Badge color={d.type_color}>{d.type_name}</Badge>
<LevelBadge level={d.level} />
<GradeBadge grade={d.award_grade} />
@@ -140,6 +142,7 @@ export function RecordDetailDialog({ open, onClose, footprintId, onEdit }: {
<StatusBadge status={d.status} />
{d.polarity === 'negative' && <NegativeBadge />}
{d.rank != null && <Badge color="var(--text-3)">第 {d.rank} 名</Badge>}
</div>
</div>
{/* 事项要素:时间/组织方 + 类型专属字段(按模板定义顺序 = 重要性顺序) */}
+2 -2
View File
@@ -21,10 +21,10 @@ export function Dialog({ open, onClose, title, width = 560, children, footer }:
if (!open) return null;
return createPortal(
<div className="fixed inset-0 z-50 flex items-start justify-center overflow-y-auto p-3 pt-[6vh] sm:p-6 sm:pt-[8vh]">
<div className="fixed inset-0 z-50 flex justify-center overflow-y-auto p-3 sm:p-6">
<div className="fixed inset-0 bg-black/45" onClick={onClose} />
<div
className="animate-in relative w-full rounded-lg border border-line bg-surface shadow-pop"
className="animate-in relative my-auto w-full rounded-lg border border-line bg-surface shadow-pop"
style={{ maxWidth: width }}
role="dialog"
>