fix(workspace): 优化今日日报侧栏文本展示
This commit is contained in:
@@ -46,22 +46,26 @@ export function DailyReportPanel({ report }: Props) {
|
||||
</div>
|
||||
) : (
|
||||
<div className="space-y-2">
|
||||
{report.items.map((item) => (
|
||||
<div key={item.id} className="rounded-lg border border-[var(--line)] bg-[var(--bg)] p-3">
|
||||
<div className="flex items-start justify-between gap-2">
|
||||
<p className="min-w-0 flex-1 text-[12px] font-medium leading-5 text-[var(--ink)]">{item.workContent}</p>
|
||||
<span className="shrink-0 rounded bg-[var(--accent-soft)] px-1.5 py-0.5 text-[10px] font-medium text-[var(--accent)]">
|
||||
{formatWorkHoursShort(item.hours)}
|
||||
</span>
|
||||
{report.items.map((item) => {
|
||||
const contextLabel = [item.productName, item.projectName, item.versionName].filter(Boolean).join(' / ');
|
||||
|
||||
return (
|
||||
<div key={item.id} className="rounded-lg border border-[var(--line)] bg-[var(--bg)] p-3">
|
||||
<div className="flex items-start justify-between gap-2">
|
||||
<p className="min-w-0 flex-1 break-words text-[12px] font-medium leading-5 text-[var(--ink)]">{item.workContent}</p>
|
||||
<span className="shrink-0 rounded bg-[var(--accent-soft)] px-1.5 py-0.5 text-[10px] font-medium text-[var(--accent)]">
|
||||
{formatWorkHoursShort(item.hours)}
|
||||
</span>
|
||||
</div>
|
||||
<p className="mt-2 truncate text-[11px] text-[var(--ink-soft)]" title={item.taskTitle}>{item.taskTitle}</p>
|
||||
{contextLabel && (
|
||||
<p className="mt-1 truncate text-[10px] text-[var(--ink-muted)]" title={contextLabel}>
|
||||
{contextLabel}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
<p className="mt-2 truncate text-[11px] text-[var(--ink-soft)]">{item.taskTitle}</p>
|
||||
{(item.productName || item.projectName || item.versionName) && (
|
||||
<p className="mt-1 truncate text-[10px] text-[var(--ink-muted)]">
|
||||
{[item.productName, item.projectName, item.versionName].filter(Boolean).join(' / ')}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user