This commit is contained in:
hailin 2025-06-24 16:44:59 +08:00
parent 04db5e7b0b
commit 3d203acf51
1 changed files with 22 additions and 22 deletions

View File

@ -556,30 +556,15 @@ export function DetailPageHeader({ data }: { data: any }) {
<div className="flex items-center gap-[5px] self-end">
{hasNonEmptyExtraData && (
<button
onClick={() => {
console.log("🟢 点击了更新按钮extra_data = ", data.extra_data);
// TODO: 后续处理逻辑写在这里
}}
className="hover:text-gray-700 transition self-end text-sm border border-gray-300 rounded px-2 py-1 bg-white"
title="更新"
>
🔄
</button>
)}
{statusLoaded && (currentStatus === "running" || currentStatus === "stopped") && (
// <button
// onClick={handleSwitchStatus}
// disabled={switchLoading || loading}
// onClick={() => {
// console.log("🟢 点击了更新按钮extra_data = ", data.extra_data);
// // TODO: 后续处理逻辑写在这里
// }}
// className="hover:text-gray-700 transition self-end text-sm border border-gray-300 rounded px-2 py-1 bg-white"
// title={currentStatus === "running" ? "停止运行" : "启动运行"}
// title="更新"
// >
// {switchLoading
// ? "处理中..."
// : currentStatus === "running"
// ? "⏹ 停止"
// : "▶️ 启动"}
// 🔄 更新
// </button>
<div className="flex flex-col items-center gap-[2px]">
<button
@ -599,7 +584,22 @@ export function DetailPageHeader({ data }: { data: any }) {
/>
</div>
)}
</div>
</div>
)}
{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 && showDelete && (