Always show logout and render a single underlying text label.

Move exit next to the theme toggle so it remains visible when APP_AUTH_DISABLED=true; PO select shows only ETH or BTC copy.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-10-14 20:27:30 +08:00
parent 2fecbda450
commit 0978650cc0
6 changed files with 45 additions and 41 deletions
+5 -5
View File
@@ -76,15 +76,15 @@
const opt = state.optionUnderly || "ETH";
const perp = state.perpUnderly || opt;
const modeLabel = root.getAttribute("data-po-mode-label") || poMode;
// 实例模式锁定:手动选约只显示一种标的(不展示 ETH/BTC 双钮)
// 实例模式锁定:手动选约只显示一种标的文案(ETH 或 BTC;跨币写 BTC→ETH)
const single = $("hp-uly-single");
if (single) {
single.textContent = crossAsset ? opt + "→" + perp : opt;
single.title = "由 HEDGE_PO_MODE 锁定(" + modeLabel + "),不可页内切换";
single.title = "本实例模式 " + modeLabel + ",标的固定不可切换";
}
document.querySelectorAll(".hp-uly-btn").forEach(function (b) {
b.hidden = true;
b.disabled = true;
// 彻底去掉永期页残留双钮(若有)
document.querySelectorAll("#hp-tab-perp_options .hp-uly-btn, #hp-po-layout .hp-uly-btn").forEach(function (b) {
b.remove();
});
const badge = $("hp-po-mode-badge");
if (badge) {