Fix running status color; add ETH qty settings with Chinese labels.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user