diff --git a/lib/common/static/instance_theme.css b/lib/common/static/instance_theme.css index 2539613..f193369 100644 --- a/lib/common/static/instance_theme.css +++ b/lib/common/static/instance_theme.css @@ -4091,6 +4091,79 @@ html[data-theme="light"] .options-estimate-row { .options-page-wrap .opt-pos-cell--depth { grid-column: span 2; } +.options-page-wrap .opt-target-row { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 8px; + margin-top: 10px; + padding-top: 10px; + border-top: 1px solid rgba(67, 82, 118, 0.45); +} +.options-page-wrap .opt-target-row-label { + font-size: 0.72rem; + color: #9aa8c7; + min-width: 2.5em; +} +.options-page-wrap .opt-pos-target-input { + width: 110px; + max-width: 36vw; + padding: 4px 8px; + border-radius: 6px; + border: 1px solid #3a4660; + background: #0f1420; + color: #e8eefc; + font-size: 0.82rem; +} +.options-page-wrap .opt-target-row .btn-secondary { + padding: 4px 10px; + font-size: 0.75rem; +} +.options-page-wrap .opt-target-row-hint { + font-size: 0.7rem; +} +.opt-target-monitors { + margin: 0 0 10px; + padding: 10px 12px; + border: 1px solid rgba(99, 118, 168, 0.45); + border-radius: 10px; + background: rgba(18, 28, 48, 0.75); +} +.opt-target-monitors-head { + font-size: 0.78rem; + font-weight: 600; + color: #c9d6f5; + margin-bottom: 8px; +} +.opt-target-mon-item { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 8px; + padding: 6px 0; + border-top: 1px solid rgba(67, 82, 118, 0.35); +} +.opt-target-mon-item:first-child { + border-top: 0; + padding-top: 0; +} +.opt-target-mon-inst { + font-size: 0.72rem; + color: #dbe6ff; + max-width: 100%; + overflow: hidden; + text-overflow: ellipsis; +} +.opt-target-mon-rule { + font-size: 0.78rem; + color: #9ad0ff; + font-variant-numeric: tabular-nums; +} +.opt-target-mon-item .btn-secondary { + margin-left: auto; + padding: 2px 8px; + font-size: 0.7rem; +} .options-page-wrap .opt-bid-plain { color: #dbe6ff; font-variant-numeric: tabular-nums; diff --git a/lib/common/static/options_panel.js b/lib/common/static/options_panel.js index bc7efd3..0898c9d 100644 --- a/lib/common/static/options_panel.js +++ b/lib/common/static/options_panel.js @@ -788,6 +788,15 @@ } else if (mode === "sheets") { body.sheets = parseInt(document.getElementById("opt-sheets-amount").value, 10); } + const tgtRaw = (document.getElementById("opt-target-idx").value || "").trim(); + if (tgtRaw !== "") { + const tgt = parseFloat(tgtRaw); + if (!Number.isFinite(tgt) || tgt <= 0) { + alert("目标位无效"); + return; + } + body.target_index = tgt; + } const d = await apiJson("/api/options/open", { method: "POST", headers: { "Content-Type": "application/json" }, @@ -845,6 +854,22 @@ (p.upl_ratio_pct != null ? fmt(p.upl_ratio_pct, 2) + "%" : "—") + "" + '
' + (t.inst_id || "") + "" +
+ '' + side + " " + fmt(t.target_index, 1) + "" +
+ '' +
+ "