Keep unflat legs on 当前持仓 after plan end.
Closed plans with open legs stay visible and closable so residual positions are not orphaned from the UI. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -937,12 +937,15 @@
|
||||
const perpSide = String(perp.side || "").toLowerCase() === "short" ? "空" : "多";
|
||||
const comboCls = pnlClsNum(combo.net_usdt);
|
||||
const liqWarn = opt.liq_ok === false;
|
||||
const unflat = !!card.unflat || String(card.status || "") === "closed";
|
||||
const bidTxt =
|
||||
opt.bid != null
|
||||
? fmt(opt.bid, 4) + (opt.bid_sz != null ? "/" + fmt(opt.bid_sz, 0) : "")
|
||||
: "—";
|
||||
return (
|
||||
'<article class="hp-live-card" data-plan-id="' +
|
||||
'<article class="hp-live-card' +
|
||||
(unflat ? " hp-live-card--unflat" : "") +
|
||||
'" data-plan-id="' +
|
||||
(card.plan_id || "") +
|
||||
'">' +
|
||||
'<div class="hp-live-card-head">' +
|
||||
@@ -950,7 +953,11 @@
|
||||
(card.plan_id || "—") +
|
||||
" · " +
|
||||
(card.underlying || "") +
|
||||
"</strong></div>" +
|
||||
"</strong>" +
|
||||
(unflat
|
||||
? '<span class="hp-live-unflat-tag" title="计划已结束但腿仍持仓中">未平仓</span>'
|
||||
: "") +
|
||||
"</div>" +
|
||||
'<div class="hp-live-time-row">' +
|
||||
"<span>开仓 <strong>" +
|
||||
(card.opened_at || "—") +
|
||||
|
||||
@@ -4175,6 +4175,18 @@ html[data-theme="light"] .opt-be-dist-down {
|
||||
margin-bottom: 8px;
|
||||
font-size: 0.88rem;
|
||||
}
|
||||
.hedge-plan-page-wrap .hp-live-card--unflat {
|
||||
border-color: rgba(245, 197, 66, 0.35);
|
||||
}
|
||||
.hedge-plan-page-wrap .hp-live-unflat-tag {
|
||||
font-size: 0.72rem;
|
||||
font-weight: 650;
|
||||
color: #1a1408;
|
||||
background: #f5c542;
|
||||
padding: 2px 8px;
|
||||
border-radius: 4px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.hedge-plan-page-wrap .hp-live-time-row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
Reference in New Issue
Block a user