diff --git a/lib/common/static/instance_settings_prefs.js b/lib/common/static/instance_settings_prefs.js index 362ab9f..e2c97cb 100644 --- a/lib/common/static/instance_settings_prefs.js +++ b/lib/common/static/instance_settings_prefs.js @@ -46,8 +46,6 @@ options: "show_nav_options", "options-review": "show_nav_options_review", options_review: "show_nav_options_review", - "hedge-plan": "show_nav_hedge_plan", - hedge_plan: "show_nav_hedge_plan", risk_policy: "show_nav_risk_policy", system_guide: "show_nav_system_guide", env_config: "show_nav_env_config", @@ -59,6 +57,11 @@ .forEach((a) => { const tab = a.getAttribute("data-embed-tab") || (a.getAttribute("href") || "").replace(/^\//, "").split("?")[0]; if (tab === "more") return; + if (tab === "hedge_plan" || tab === "hedge-plan") { + a.classList.add("nav-hidden"); + a.style.display = "none"; + return; + } const key = map[tab]; if (!key) return; const show = navPrefShow(display, key); @@ -70,6 +73,7 @@ function pageNavAllowed(tab) { const d = DISPLAY(); + if (tab === "hedge_plan" || tab === "hedge-plan") return false; const map = { dashboard: "show_nav_dashboard", account_ledger: "show_nav_account_ledger", @@ -82,8 +86,6 @@ options: "show_nav_options", "options-review": "show_nav_options_review", options_review: "show_nav_options_review", - "hedge-plan": "show_nav_hedge_plan", - hedge_plan: "show_nav_hedge_plan", risk_policy: "show_nav_risk_policy", system_guide: "show_nav_system_guide", env_config: "show_nav_env_config", diff --git a/lib/instance/instance_display_prefs_lib.py b/lib/instance/instance_display_prefs_lib.py index c60cc29..2976f36 100644 --- a/lib/instance/instance_display_prefs_lib.py +++ b/lib/instance/instance_display_prefs_lib.py @@ -21,7 +21,6 @@ DEFAULT_INSTANCE_DISPLAY: dict[str, bool] = { "show_nav_env_config": True, "show_nav_options": True, "show_nav_options_review": True, - "show_nav_hedge_plan": False, "show_settings_transfer": False, # 永续资金划转默认隐藏 "show_settings_export": True, "show_settings_password": True, @@ -43,7 +42,6 @@ DISPLAY_LABELS: dict[str, str] = { "show_nav_env_config": "env配置", "show_nav_options": "期权", "show_nav_options_review": "期权复盘", - "show_nav_hedge_plan": "对冲计划", "show_settings_transfer": "永续资金划转", "show_settings_export": "数据导出", "show_settings_password": "账户密码修改", @@ -65,7 +63,6 @@ NAV_TAB_ALLOWED: dict[str, str] = { "env_config": "show_nav_env_config", "options": "show_nav_options", "options_review": "show_nav_options_review", - "hedge_plan": "show_nav_hedge_plan", } @@ -111,8 +108,8 @@ def display_prefs_template_context(get_db: Callable) -> dict[str, Any]: def tab_allowed(tab: str, display: Optional[dict[str, bool]] = None) -> bool: prefs = normalize_display_prefs(display or {}) t = (tab or "").strip() - if t in ("trade", "records", "stats"): - return False # 实盘下单 / 交易记录复盘 / 统计分析 已移除 + if t in ("trade", "records", "stats", "hedge_plan"): + return False # 实盘下单 / 交易记录复盘 / 统计分析 / 对冲计划 已移除 key = NAV_TAB_ALLOWED.get(t) if not key: return True @@ -129,7 +126,6 @@ def display_meta_for_ui() -> list[dict[str, Any]]: "show_nav_env_config", "show_nav_options", "show_nav_options_review", - "show_nav_hedge_plan", ] settings_keys = [ "show_settings_transfer", diff --git a/lib/instance/instance_embed_lib.py b/lib/instance/instance_embed_lib.py index 308b1f0..614f8fe 100644 --- a/lib/instance/instance_embed_lib.py +++ b/lib/instance/instance_embed_lib.py @@ -16,7 +16,6 @@ EMBED_TABS: tuple[str, ...] = ( "key_monitor", "options", "options_review", - "hedge_plan", "risk_policy", "system_guide", "env_config", @@ -33,7 +32,7 @@ PATH_TO_EMBED_TAB: dict[str, str] = { "/key_monitor": "key_monitor", "/options": "options", "/options/review": "options_review", - "/hedge-plan": "hedge_plan", + "/hedge-plan": "options", # 对冲计划已移除,旧链接落到期权 "/risk_policy": "risk_policy", "/system_guide": "system_guide", "/env_config": "env_config", diff --git a/lib/instance/templates/embed_page_fragment.html b/lib/instance/templates/embed_page_fragment.html index cafc65f..5faa0d1 100644 --- a/lib/instance/templates/embed_page_fragment.html +++ b/lib/instance/templates/embed_page_fragment.html @@ -127,8 +127,6 @@ {% include 'options_panel.html' %} {% elif page == 'options_review' %} {% include 'options_review_panel.html' %} - {% elif page == 'hedge_plan' %} - {% include 'hedge_plan_panel.html' %} {% endif %} diff --git a/lib/instance/templates/embed_shell.html b/lib/instance/templates/embed_shell.html index efb7378..fa602fc 100644 --- a/lib/instance/templates/embed_shell.html +++ b/lib/instance/templates/embed_shell.html @@ -35,7 +35,7 @@ >