This commit is contained in:
parent
2cb7353e6a
commit
76478e6835
|
|
@ -485,34 +485,34 @@ export function DetailPageHeader({ data }: { data: any }) {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center gap-[5px] self-end">
|
||||
{statusLoaded && (currentStatus === "running" || currentStatus === "stopped") && (
|
||||
<button
|
||||
onClick={handleSwitchStatus}
|
||||
disabled={switchLoading || loading}
|
||||
className="hover:text-gray-700 transition self-end text-sm border border-gray-300 rounded px-2 py-1 bg-white"
|
||||
title={currentStatus === "running" ? "停止运行" : "启动运行"}
|
||||
>
|
||||
{switchLoading
|
||||
? "处理中..."
|
||||
: currentStatus === "running"
|
||||
? "⏹ 停止"
|
||||
: "▶️ 启动"}
|
||||
</button>
|
||||
)}
|
||||
|
||||
{statusLoaded && (currentStatus === "running" || currentStatus === "stopped") && (
|
||||
<button
|
||||
onClick={handleSwitchStatus}
|
||||
disabled={switchLoading || loading}
|
||||
className="hover:text-gray-700 transition self-end mr-2 text-sm border border-gray-300 rounded px-2 py-1 bg-white"
|
||||
title={currentStatus === "running" ? "停止运行" : "启动运行"}
|
||||
>
|
||||
{switchLoading
|
||||
? "处理中..."
|
||||
: currentStatus === "running"
|
||||
? "⏹ 停止"
|
||||
: "▶️ 启动"}
|
||||
</button>
|
||||
)}
|
||||
{statusLoaded && showDelete && (
|
||||
<button
|
||||
onClick={handleDelete}
|
||||
className="hover:text-gray-700 transition self-end"
|
||||
disabled={loading}
|
||||
title="删除"
|
||||
>
|
||||
<Trash2 size={20} />
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
{statusLoaded && showDelete && (
|
||||
<button
|
||||
onClick={handleDelete}
|
||||
className="hover:text-gray-700 transition self-end"
|
||||
disabled={loading}
|
||||
title="删除"
|
||||
>
|
||||
<Trash2 size={20} />
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue