fix: 已有蓝图时禁用「初始化蓝图」按钮
避免用户误用初始化覆盖已有蓝图,引导使用「更新蓝图描绘」。 disabled 状态加 tooltip 提示原因。
This commit is contained in:
parent
157df716c7
commit
23b109119a
@ -1141,8 +1141,12 @@ function GovernancePanel({
|
|||||||
<div className="flex gap-2">
|
<div className="flex gap-2">
|
||||||
<button
|
<button
|
||||||
onClick={() => handleOpenPrompt("init")}
|
onClick={() => handleOpenPrompt("init")}
|
||||||
|
disabled={bpStatus?.status !== "none"}
|
||||||
|
title={bpStatus?.status !== "none" ? "该项目已有蓝图,请使用「更新蓝图描绘」" : undefined}
|
||||||
className={`flex-1 py-1.5 rounded-lg text-xs transition-colors ${
|
className={`flex-1 py-1.5 rounded-lg text-xs transition-colors ${
|
||||||
promptMode === "init"
|
bpStatus?.status !== "none"
|
||||||
|
? "border border-gray-100 text-gray-300 cursor-not-allowed"
|
||||||
|
: promptMode === "init"
|
||||||
? "bg-blue-600 text-white"
|
? "bg-blue-600 text-white"
|
||||||
: "border border-gray-200 text-gray-600 hover:bg-gray-50"
|
: "border border-gray-200 text-gray-600 hover:bg-gray-50"
|
||||||
}`}
|
}`}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user