fix条件单划转按钮等宽,并去掉备用打开入口。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+1
-34
@@ -211,29 +211,6 @@
|
|||||||
return n.toFixed(2) + "U";
|
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) {
|
function patchCandidateFunds(instanceId, tradingUsdt, fundingUsdt) {
|
||||||
const id = String(instanceId);
|
const id = String(instanceId);
|
||||||
const it = candidatesById[id];
|
const it = candidatesById[id];
|
||||||
@@ -389,7 +366,7 @@
|
|||||||
escapeHtml(fmtTradingU(it.funding_usdt)) +
|
escapeHtml(fmtTradingU(it.funding_usdt)) +
|
||||||
"</span>" +
|
"</span>" +
|
||||||
'<span class="cond-inst-actions">' +
|
'<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) +
|
escapeHtml(id) +
|
||||||
'" data-dir="to_trading" data-label="划入交易" title="' +
|
'" data-dir="to_trading" data-label="划入交易" title="' +
|
||||||
escapeHtml(xferTitle) +
|
escapeHtml(xferTitle) +
|
||||||
@@ -403,9 +380,6 @@
|
|||||||
'"' +
|
'"' +
|
||||||
dis +
|
dis +
|
||||||
">划入资金</button>" +
|
">划入资金</button>" +
|
||||||
'<button type="button" class="btn btn-secondary btn-sm cond-inst-open" data-inst-id="' +
|
|
||||||
escapeHtml(id) +
|
|
||||||
'" title="新标签打开实例">打开</button>' +
|
|
||||||
"</span>" +
|
"</span>" +
|
||||||
"</div>" +
|
"</div>" +
|
||||||
"</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) {
|
function renderDesktopRows(list) {
|
||||||
|
|||||||
+5
-2
@@ -1587,10 +1587,13 @@ input.readonly {
|
|||||||
gap: 6px;
|
gap: 6px;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
}
|
}
|
||||||
.cond-inst-xfer,
|
.cond-inst-xfer {
|
||||||
.cond-inst-open {
|
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
min-width: 5.5em;
|
||||||
|
box-sizing: border-box;
|
||||||
|
text-align: center;
|
||||||
|
justify-content: center;
|
||||||
}
|
}
|
||||||
.cond-inst.is-off { cursor: not-allowed; }
|
.cond-inst.is-off { cursor: not-allowed; }
|
||||||
.cond-actions {
|
.cond-actions {
|
||||||
|
|||||||
+1
-1
@@ -11,7 +11,7 @@
|
|||||||
<link rel="icon" href="{{ url_for('static', filename='icons/favicon.ico') }}?v=2" sizes="any">
|
<link rel="icon" href="{{ url_for('static', filename='icons/favicon.ico') }}?v=2" sizes="any">
|
||||||
<link rel="apple-touch-icon" href="{{ url_for('static', filename='icons/apple-touch-icon.png') }}?v=2">
|
<link rel="apple-touch-icon" href="{{ url_for('static', filename='icons/apple-touch-icon.png') }}?v=2">
|
||||||
<link rel="manifest" href="/manifest.webmanifest">
|
<link rel="manifest" href="/manifest.webmanifest">
|
||||||
<link rel="stylesheet" href="{{ url_for('static', filename='hub.css') }}?v=50">
|
<link rel="stylesheet" href="{{ url_for('static', filename='hub.css') }}?v=51">
|
||||||
<script>
|
<script>
|
||||||
(function () {
|
(function () {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -68,7 +68,7 @@
|
|||||||
|
|
||||||
<div class="cond-section">
|
<div class="cond-section">
|
||||||
<div class="cond-section-title">客户端</div>
|
<div class="cond-section-title">客户端</div>
|
||||||
<p class="muted" style="margin:0 0 8px;font-size:.76rem">展示交易/资金余额;「划入交易 / 划入资金」本页双向划转,表单不丢。「打开」仅备用进实例。</p>
|
<p class="muted" style="margin:0 0 8px;font-size:.76rem">展示交易/资金余额;「划入交易 / 划入资金」本页双向划转,表单不丢。</p>
|
||||||
<div id="cf-instances"></div>
|
<div id="cf-instances"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -95,6 +95,6 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
<script src="{{ url_for('static', filename='cond_orders.js') }}?v=11"></script>
|
<script src="{{ url_for('static', filename='cond_orders.js') }}?v=12"></script>
|
||||||
<script>HubCondOrders.boot();</script>
|
<script>HubCondOrders.boot();</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
Reference in New Issue
Block a user