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:
@@ -76,15 +76,15 @@
|
|||||||
const opt = state.optionUnderly || "ETH";
|
const opt = state.optionUnderly || "ETH";
|
||||||
const perp = state.perpUnderly || opt;
|
const perp = state.perpUnderly || opt;
|
||||||
const modeLabel = root.getAttribute("data-po-mode-label") || poMode;
|
const modeLabel = root.getAttribute("data-po-mode-label") || poMode;
|
||||||
// 实例模式锁定:手动选约只显示一种标的(不展示 ETH/BTC 双钮)
|
// 实例模式锁定:手动选约只显示一种标的文案(ETH 或 BTC;跨币写 BTC→ETH)
|
||||||
const single = $("hp-uly-single");
|
const single = $("hp-uly-single");
|
||||||
if (single) {
|
if (single) {
|
||||||
single.textContent = crossAsset ? opt + "→" + perp : opt;
|
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;
|
document.querySelectorAll("#hp-tab-perp_options .hp-uly-btn, #hp-po-layout .hp-uly-btn").forEach(function (b) {
|
||||||
b.disabled = true;
|
b.remove();
|
||||||
});
|
});
|
||||||
const badge = $("hp-po-mode-badge");
|
const badge = $("hp-po-mode-badge");
|
||||||
if (badge) {
|
if (badge) {
|
||||||
|
|||||||
@@ -3635,42 +3635,50 @@ html[data-theme="light"] .opt-be-dist-down {
|
|||||||
.hedge-plan-page-wrap .hp-uly-lock {
|
.hedge-plan-page-wrap .hp-uly-lock {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
gap: 6px;
|
gap: 6px;
|
||||||
align-items: center;
|
align-items: baseline;
|
||||||
|
margin-right: 4px;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
.hedge-plan-page-wrap .hp-uly-lab {
|
||||||
|
font-size: 0.82rem;
|
||||||
}
|
}
|
||||||
.hedge-plan-page-wrap .hp-uly-single {
|
.hedge-plan-page-wrap .hp-uly-single {
|
||||||
|
font-size: 0.95rem;
|
||||||
|
font-weight: 700;
|
||||||
|
letter-spacing: 0.04em;
|
||||||
|
color: #e8eeff;
|
||||||
|
border: none;
|
||||||
|
background: none;
|
||||||
|
padding: 0;
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
.hedge-plan-page-wrap .hp-uly-lock .hp-uly-btn {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
.instance-header-toolbar-end .header-logout-btn {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
margin-left: 8px;
|
||||||
min-width: 3.2rem;
|
padding: 5px 12px;
|
||||||
padding: 6px 12px;
|
|
||||||
border: 1px solid #3a4a6e;
|
border: 1px solid #3a4a6e;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
background: #1a2238;
|
background: #1a2238;
|
||||||
color: #dbe4ff;
|
color: #dbe4ff;
|
||||||
font-weight: 600;
|
text-decoration: none;
|
||||||
font-size: 0.88rem;
|
font-size: 0.85rem;
|
||||||
letter-spacing: 0.03em;
|
white-space: nowrap;
|
||||||
cursor: default;
|
|
||||||
user-select: none;
|
|
||||||
}
|
}
|
||||||
.hedge-plan-page-wrap .hp-uly-lock .hp-uly-btn:disabled {
|
.instance-header-toolbar-end .header-logout-btn:hover {
|
||||||
opacity: 0.75;
|
border-color: #6a7fb0;
|
||||||
cursor: not-allowed;
|
color: #fff;
|
||||||
}
|
|
||||||
.top-nav-logout {
|
|
||||||
grid-column: 1;
|
|
||||||
justify-self: start;
|
|
||||||
align-self: center;
|
|
||||||
}
|
|
||||||
html[data-theme="light"] .top-nav-logout {
|
|
||||||
color: #334;
|
|
||||||
background: #f3f5fa;
|
|
||||||
border-color: #c5cddf;
|
|
||||||
}
|
}
|
||||||
html[data-theme="light"] .hedge-plan-page-wrap .hp-uly-single {
|
html[data-theme="light"] .hedge-plan-page-wrap .hp-uly-single {
|
||||||
|
color: #1a2438;
|
||||||
|
}
|
||||||
|
html[data-theme="light"] .instance-header-toolbar-end .header-logout-btn {
|
||||||
background: #eef1f8;
|
background: #eef1f8;
|
||||||
border-color: #c5cddf;
|
border-color: #c5cddf;
|
||||||
color: #1a2438;
|
color: #334;
|
||||||
}
|
}
|
||||||
.hedge-plan-page-wrap .hp-po-gate-inline {
|
.hedge-plan-page-wrap .hp-po-gate-inline {
|
||||||
font-size: 0.82rem;
|
font-size: 0.82rem;
|
||||||
|
|||||||
@@ -66,8 +66,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</details>
|
</details>
|
||||||
<div class="form-row hp-opt-toolbar hp-po-opt-toolbar options-chain-toolbar">
|
<div class="form-row hp-opt-toolbar hp-po-opt-toolbar options-chain-toolbar">
|
||||||
<span class="hp-uly-lock" id="hp-uly-lock" title="由 HEDGE_PO_MODE 锁定,不可页内切换">
|
<span class="hp-uly-lock" id="hp-uly-lock" title="由 HEDGE_PO_MODE 锁定,本实例仅此标的">
|
||||||
<span class="hp-uly-single" id="hp-uly-single" aria-live="polite">{{ hedge_option_underlying or options_default_underly or 'ETH' }}</span>
|
<span class="muted hp-uly-lab">标的</span>
|
||||||
|
<strong class="hp-uly-single" id="hp-uly-single" aria-live="polite">{{ hedge_option_underlying or options_default_underly or 'ETH' }}</strong>
|
||||||
</span>
|
</span>
|
||||||
<select id="hp-exp-select"><option value="">选择到期日</option></select>
|
<select id="hp-exp-select"><option value="">选择到期日</option></select>
|
||||||
<span class="hp-oo-seg hp-po-dir-seg" role="group" aria-label="期权类型">
|
<span class="hp-oo-seg hp-po-dir-seg" role="group" aria-label="期权类型">
|
||||||
@@ -507,4 +508,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script src="/static/hedge_plan.js?v=63"></script>
|
<script src="/static/hedge_plan.js?v=64"></script>
|
||||||
|
|||||||
@@ -7,8 +7,8 @@
|
|||||||
<script src="/static/autofill_guard.js?v=1"></script>
|
<script src="/static/autofill_guard.js?v=1"></script>
|
||||||
<link rel="stylesheet" href="/static/instance_theme_early.css?v=4">
|
<link rel="stylesheet" href="/static/instance_theme_early.css?v=4">
|
||||||
<link rel="stylesheet" href="/static/account_risk_badge.css?v=4">
|
<link rel="stylesheet" href="/static/account_risk_badge.css?v=4">
|
||||||
<link rel="stylesheet" href="/static/instance_page.css?v=28">
|
<link rel="stylesheet" href="/static/instance_page.css?v=29">
|
||||||
<link rel="stylesheet" href="/static/instance_theme.css?v=124">
|
<link rel="stylesheet" href="/static/instance_theme.css?v=125">
|
||||||
<script src="/static/account_risk_badge.js?v=4"></script>
|
<script src="/static/account_risk_badge.js?v=4"></script>
|
||||||
<script src="/static/open_submit_gate.js?v=1"></script>
|
<script src="/static/open_submit_gate.js?v=1"></script>
|
||||||
<meta name="theme-color" content="#0b0d14">
|
<meta name="theme-color" content="#0b0d14">
|
||||||
@@ -29,9 +29,6 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
{% include 'instance_brand_header.html' %}
|
{% include 'instance_brand_header.html' %}
|
||||||
<nav class="top-nav embed-top-nav" aria-label="实例导航">
|
<nav class="top-nav embed-top-nav" aria-label="实例导航">
|
||||||
{% if not auth_disabled %}
|
|
||||||
<a href="/logout" class="top-nav-logout" title="退出登录">退出</a>
|
|
||||||
{% endif %}
|
|
||||||
<div class="top-nav-links">
|
<div class="top-nav-links">
|
||||||
{% if hedge_plan_nav_visible and display.show_nav_hedge_plan %}
|
{% if hedge_plan_nav_visible and display.show_nav_hedge_plan %}
|
||||||
<a href="/hedge-plan" data-embed-tab="hedge_plan" class="{% if initial_tab == 'hedge_plan' %}active{% endif %}">{% if hedge_plan_show_options_options %}期期对冲{% else %}永期对冲{% endif %}</a>
|
<a href="/hedge-plan" data-embed-tab="hedge_plan" class="{% if initial_tab == 'hedge_plan' %}active{% endif %}">{% if hedge_plan_show_options_options %}期期对冲{% else %}永期对冲{% endif %}</a>
|
||||||
|
|||||||
@@ -18,8 +18,8 @@
|
|||||||
<link rel="apple-touch-icon" href="/static/icons/apple-touch-icon.png">
|
<link rel="apple-touch-icon" href="/static/icons/apple-touch-icon.png">
|
||||||
<link rel="manifest" href="/static/icons/manifest.webmanifest">
|
<link rel="manifest" href="/static/icons/manifest.webmanifest">
|
||||||
<title>{{ pwa_app_name }}</title>
|
<title>{{ pwa_app_name }}</title>
|
||||||
<link rel="stylesheet" href="/static/instance_page.css?v=28">
|
<link rel="stylesheet" href="/static/instance_page.css?v=29">
|
||||||
<link rel="stylesheet" href="/static/instance_theme.css?v=124">
|
<link rel="stylesheet" href="/static/instance_theme.css?v=125">
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body
|
<body
|
||||||
@@ -152,9 +152,6 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
{% include 'instance_brand_header.html' %}
|
{% include 'instance_brand_header.html' %}
|
||||||
<div class="top-nav">
|
<div class="top-nav">
|
||||||
{% if not auth_disabled %}
|
|
||||||
<a href="/logout" class="top-nav-logout" title="退出登录">退出</a>
|
|
||||||
{% endif %}
|
|
||||||
<div class="top-nav-links">
|
<div class="top-nav-links">
|
||||||
{% if hedge_plan_nav_visible and display.show_nav_hedge_plan %}
|
{% if hedge_plan_nav_visible and display.show_nav_hedge_plan %}
|
||||||
<a href="/hedge-plan" class="{% if page == 'hedge_plan' %}active{% endif %}">{% if hedge_plan_show_options_options %}期期对冲{% else %}永期对冲{% endif %}</a>
|
<a href="/hedge-plan" class="{% if page == 'hedge_plan' %}active{% endif %}">{% if hedge_plan_show_options_options %}期期对冲{% else %}永期对冲{% endif %}</a>
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
<span class="risk-status-badge risk-status-{{ risk_status.status|default('normal') }}" id="account-risk-badge" role="status" title="{{ risk_status.reason|default('', true) }}" data-status-label="{{ risk_status.status_label|default('正常') }}"{% if risk_status.freeze_until_ms %} data-freeze-until-ms="{{ risk_status.freeze_until_ms }}"{% endif %}>{{ risk_status.status_label|default('正常') }}</span>
|
<span class="risk-status-badge risk-status-{{ risk_status.status|default('normal') }}" id="account-risk-badge" role="status" title="{{ risk_status.reason|default('', true) }}" data-status-label="{{ risk_status.status_label|default('正常') }}"{% if risk_status.freeze_until_ms %} data-freeze-until-ms="{{ risk_status.freeze_until_ms }}"{% endif %}>{{ risk_status.status_label|default('正常') }}</span>
|
||||||
</div>
|
</div>
|
||||||
{% include 'instance_theme_toggle.html' %}
|
{% include 'instance_theme_toggle.html' %}
|
||||||
|
<a href="/logout" class="header-logout-btn" title="退出登录">退出</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="instance-header-stats-wrap instance-desktop-only">
|
<div class="instance-header-stats-wrap instance-desktop-only">
|
||||||
|
|||||||
Reference in New Issue
Block a user