fix条件单划转按钮等宽,并去掉备用打开入口。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-10-13 14:42:00 +08:00
parent b81b999090
commit ab47fb6142
4 changed files with 9 additions and 39 deletions
+1 -34
View File
@@ -211,29 +211,6 @@
return n.toFixed(2) + "U";
}
function openInstanceTab(instanceId, tab) {
if (!instanceId) return;
const q = tab ? "?tab=" + encodeURIComponent(tab) : "";
fetch("/api/instances/" + encodeURIComponent(instanceId) + "/open_url" + q)
.then(function (r) {
return r.json();
})
.then(function (d) {
const url =
d && d.url
? d.url
: "/desk?id=" + encodeURIComponent(instanceId);
window.open(url, "_blank", "noopener,noreferrer");
})
.catch(function () {
window.open(
"/desk?id=" + encodeURIComponent(instanceId),
"_blank",
"noopener,noreferrer"
);
});
}
function patchCandidateFunds(instanceId, tradingUsdt, fundingUsdt) {
const id = String(instanceId);
const it = candidatesById[id];
@@ -389,7 +366,7 @@
escapeHtml(fmtTradingU(it.funding_usdt)) +
"</span>" +
'<span class="cond-inst-actions">' +
'<button type="button" class="btn btn-sm cond-inst-xfer" data-inst-id="' +
'<button type="button" class="btn btn-secondary btn-sm cond-inst-xfer" data-inst-id="' +
escapeHtml(id) +
'" data-dir="to_trading" data-label="划入交易" title="' +
escapeHtml(xferTitle) +
@@ -403,9 +380,6 @@
'"' +
dis +
">划入资金</button>" +
'<button type="button" class="btn btn-secondary btn-sm cond-inst-open" data-inst-id="' +
escapeHtml(id) +
'" title="新标签打开实例">打开</button>' +
"</span>" +
"</div>" +
"</div>" +
@@ -476,13 +450,6 @@
);
});
});
box.querySelectorAll(".cond-inst-open").forEach(function (btn) {
btn.addEventListener("click", function (ev) {
ev.preventDefault();
ev.stopPropagation();
openInstanceTab(btn.getAttribute("data-inst-id") || "", "options");
});
});
}
function renderDesktopRows(list) {