This commit is contained in:
parent
04db5e7b0b
commit
3d203acf51
|
|
@ -556,30 +556,15 @@ export function DetailPageHeader({ data }: { data: any }) {
|
||||||
|
|
||||||
<div className="flex items-center gap-[5px] self-end">
|
<div className="flex items-center gap-[5px] self-end">
|
||||||
{hasNonEmptyExtraData && (
|
{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
|
// <button
|
||||||
// onClick={handleSwitchStatus}
|
// onClick={() => {
|
||||||
// disabled={switchLoading || loading}
|
// 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"
|
// 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>
|
// </button>
|
||||||
<div className="flex flex-col items-center gap-[2px]">
|
<div className="flex flex-col items-center gap-[2px]">
|
||||||
<button
|
<button
|
||||||
|
|
@ -599,7 +584,22 @@ export function DetailPageHeader({ data }: { data: any }) {
|
||||||
/>
|
/>
|
||||||
</div>
|
</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 && (
|
{statusLoaded && showDelete && (
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue