Show open-capacity labels, enlarge funds, move rules; WeCom on short funds.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-29 17:53:43 +08:00
parent 6081fb7e48
commit 80c561bdce
7 changed files with 399 additions and 31 deletions
+46 -3
View File
@@ -80,6 +80,7 @@ const PHASE_ZH: Record<string, string> = {
outside_window: "窗外",
liquidity_wait: "流动性等待",
weekend_skip: "周末跳过",
wait_funds: "资金不足",
};
export default function PlanPage() {
@@ -213,6 +214,16 @@ export default function PlanPage() {
{err ? <div className="err">{err}</div> : null}
<div className="plan-rules-fold">
<details>
<summary></summary>
<p className="meta plan-rules-body">
{String(plan?.exchange || "okx").toUpperCase()} · ETH-USDT-SWAP ·
(/) ·
</p>
</details>
</div>
<div className="plan-actions">
<button
className={plan?.running ? "btn btn-running" : "btn"}
@@ -318,9 +329,41 @@ export default function PlanPage() {
</div>
<div className="kv">
<span> / </span>
<span className="mono">
{fmt(plan?.ledger?.equity)} / {fmt(plan?.ledger?.available)} ·{" "}
{fmt(plan?.leverage, 0)}x
<span className="open-cap-row">
<span
className={
plan?.open_capacity?.perp_can_open === true
? "open-cap-ok"
: plan?.open_capacity?.perp_can_open === false
? "open-cap-bad"
: "mono"
}
title={
plan?.open_capacity?.perp_need_usdt != null
? `需≈${plan.open_capacity.perp_need_usdt}U / 有${plan.open_capacity.perp_have_usdt ?? "—"}U`
: undefined
}
>
{plan?.open_capacity?.perp_label ||
`永续${fmt(plan?.leverage, 0)}x —`}
</span>
<span className="open-cap-sep">·</span>
<span
className={
plan?.open_capacity?.option_can_open === true
? "open-cap-ok"
: plan?.open_capacity?.option_can_open === false
? "open-cap-bad"
: "mono"
}
title={
plan?.open_capacity?.option_need_usdc != null
? `需≈${plan.open_capacity.option_need_usdc}U / 有${plan.open_capacity.option_have_usdc ?? "—"}U`
: undefined
}
>
{plan?.open_capacity?.option_label || "期权 —"}
</span>
</span>
</div>
<div className="kv">