fix: 侧边详情显示产品/项目/版本上下文
所有 Drawer 新增 contextLabel 可选属性: - 从工作台打开时传入"产品 / 项目 / 版本"路径 - 显示在 Drawer 顶部灰色背景条中 - 从版本详情打开时不传,不显示(无需冗余) - 统一样式:px-5 py-2 bg-[var(--bg-subtle)] text-[11px] 涉及组件: - PlanDetailDrawer - DevTaskDetailDrawer - TestCaseDetailDrawer - BugDetailDrawer Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -21,9 +21,10 @@ const LOG_ACTION_LABEL: Record<string, string> = {
|
||||
interface Props {
|
||||
bugId: string;
|
||||
onClose: () => void;
|
||||
contextLabel?: string;
|
||||
}
|
||||
|
||||
export function BugDetailDrawer({ bugId, onClose }: Props) {
|
||||
export function BugDetailDrawer({ bugId, onClose, contextLabel }: Props) {
|
||||
const { bugs, changeStatus, transferBug } = useBugStore();
|
||||
const { testCases } = useTestCaseStore();
|
||||
const { requirements } = useRequirementStore();
|
||||
@@ -66,6 +67,11 @@ export function BugDetailDrawer({ bugId, onClose }: Props) {
|
||||
return (
|
||||
<div className="fixed inset-0 z-50 flex justify-end" onClick={onClose}>
|
||||
<div className="w-full max-w-md h-full bg-[var(--bg)] border-l border-[var(--line)] shadow-2xl flex flex-col" onClick={(e) => e.stopPropagation()}>
|
||||
{contextLabel && (
|
||||
<div className="px-5 py-2 border-b border-[var(--line)] bg-[var(--bg-subtle)] shrink-0">
|
||||
<span className="text-[11px] text-[var(--ink-muted)]">{contextLabel}</span>
|
||||
</div>
|
||||
)}
|
||||
<div className="flex items-center justify-between h-14 px-5 border-b border-[var(--line)] bg-[var(--bg-card)] shrink-0">
|
||||
<div className="flex items-center gap-2">
|
||||
<span className="text-[12px] font-mono text-[var(--ink-muted)]">{bug.bugNo}</span>
|
||||
|
||||
Reference in New Issue
Block a user