代码提交
This commit is contained in:
1 parent
cdb8aa5f81
commit
ebc727e4fd
1 file changed
+6
-1
@@ -77,6 +77,7 @@ import {
|
|||||||
} from "@/strategy-components/api/report-structures";
|
} from "@/strategy-components/api/report-structures";
|
||||||
import { useSkills } from "@/core/skills/hooks";
|
import { useSkills } from "@/core/skills/hooks";
|
||||||
import { desensitize } from "@/lib/desensitize";
|
import { desensitize } from "@/lib/desensitize";
|
||||||
|
import { cn } from "@/lib/utils";
|
||||||
|
|
||||||
// ── shared helpers ───────────────────────────────────────────────────────────
|
// ── shared helpers ───────────────────────────────────────────────────────────
|
||||||
|
|
||||||
@@ -1213,12 +1214,16 @@ export function WorkflowConfigButton({
|
|||||||
return structuresQuery.data?.find((structure) => structure.content.trim() === content)?.title ?? null;
|
return structuresQuery.data?.find((structure) => structure.content.trim() === content)?.title ?? null;
|
||||||
}, [appliedContent, structuresQuery.data]);
|
}, [appliedContent, structuresQuery.data]);
|
||||||
const buttonLabel = selectedWorkflowTitle || "工作流配置";
|
const buttonLabel = selectedWorkflowTitle || "工作流配置";
|
||||||
|
const isSelected = Boolean(selectedWorkflowTitle);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Button
|
<Button
|
||||||
aria-label={selectedWorkflowTitle ? `已选择工作流:${selectedWorkflowTitle}` : "工作流配置"}
|
aria-label={selectedWorkflowTitle ? `已选择工作流:${selectedWorkflowTitle}` : "工作流配置"}
|
||||||
className={className}
|
className={cn(
|
||||||
|
className,
|
||||||
|
isSelected && "bg-accent text-accent-foreground dark:bg-accent/50",
|
||||||
|
)}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
onClick={() => setOpen(true)}
|
onClick={() => setOpen(true)}
|
||||||
size={size}
|
size={size}
|
||||||
|
|||||||
Reference in new issue
Block a user