Fix running status color; add ETH qty settings with Chinese labels.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-24 17:24:27 +08:00
parent b6d9877538
commit 5125c6702b
7 changed files with 102 additions and 47 deletions
+21 -4
View File
@@ -59,6 +59,20 @@ export default function PlanPage() {
const exitN = plan?.exit_move_points ?? 30;
const move = pos?.move_points ?? 0;
const phaseZh: Record<string, string> = {
idle: "空闲",
wait_signal: "等待信号",
opening: "开仓中",
open: "持仓中",
closing: "平仓中",
resting: "休息中",
paused: "已暂停",
stopped: "已停开",
outside_window: "窗外",
liquidity_wait: "流动性等待",
};
const phaseLabel = phaseZh[plan?.phase || ""] || plan?.phase || "—";
return (
<div>
<h2 style={{ marginTop: 0 }}></h2>
@@ -114,13 +128,16 @@ export default function PlanPage() {
<div className="card" style={{ marginBottom: 12 }}>
<div className="kv">
<span></span>
<span className="mono">
<span>
{plan?.running ? (
<span className="status-running"></span>
) : (
<span className="status-stopped"></span>
)}{" "}
· {plan?.phase || "—"} · {plan?.rounds_done ?? 0}/{plan?.max_rounds ?? 3}
)}
<span className="mono">
{" "}
· {phaseLabel} · {plan?.rounds_done ?? 0}/{plan?.max_rounds ?? 3}
</span>
</span>
</div>
<div className="kv">
@@ -147,7 +164,7 @@ export default function PlanPage() {
<span></span>
<span className="mono">
{pos?.has_position
? `永续${pos.perp_side} + 买${pos.option_side?.toUpperCase()}`
? `永续${pos.perp_side === "long" ? "多" : "空"} + 买${pos.option_side === "call" ? "Call" : "Put"}`
: "—"}{" "}
{biasTag}
</span>