从导航显示与顶栏去掉「对冲计划」开关与入口。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-09-30 23:28:01 +08:00
parent 0acba5e351
commit 56df9a596f
7 changed files with 20 additions and 30 deletions
+2 -6
View File
@@ -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",