Fix options position bar layout so Put badge and contract id display on one line.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-09 17:37:24 +08:00
parent 3d11b91869
commit af7a397816
2 changed files with 26 additions and 9 deletions
+3 -3
View File
@@ -482,15 +482,15 @@
'<button type="button" class="opt-pos-bar" aria-expanded="' + (expanded ? "true" : "false") + '">' +
'<span class="opt-pos-bar-main">' +
'<span class="opt-pos-bar-chevron" aria-hidden="true">▶</span>' +
'<strong class="opt-pos-bar-title">' + inst + "</strong>" +
'<strong class="opt-pos-bar-title" title="' + inst + '">' + inst + "</strong>" +
'<span class="pos-side-badge ' + sideCls + '">' + optTypeLabel(p.opt_type) + "</span>" +
'<span class="opt-pos-bar-meta">行权 ' + fmt(p.strike, 0) + " · " + fmt(p.pos, 0) + "张</span>" +
"</span>" +
'<span class="opt-pos-bar-side">' +
(expAttr
? '<span class="opt-pos-bar-cd">到期 <span class="opt-expiry-cd" data-opt-exp-ms="' + expAttr + '">—</span></span>'
? '<span class="opt-pos-bar-cd"><span class="opt-expiry-cd" data-opt-exp-ms="' + expAttr + '">—</span></span>'
: "") +
'<span class="opt-pos-bar-pnl ' + uplCls + '">' + fmt(p.upl, 2) + " USDC</span>" +
'<span class="opt-pos-bar-pnl ' + uplCls + '">' + fmt(p.upl, 2) + "</span>" +
'<span class="opt-pos-bar-roi ' + uplCls + '">' +
(p.upl_ratio_pct != null ? fmt(p.upl_ratio_pct, 2) + "%" : "—") + "</span>" +
"</span>" +