Slim CoinOX UI to okx对冲: drop records/stats nav and trim env.
Redirect removed pages, disable trade-records API, and keep only options/hedge-related env groups. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -14,8 +14,9 @@ DEFAULT_INSTANCE_DISPLAY: dict[str, bool] = {
|
||||
"show_nav_trade": False,
|
||||
"show_nav_strategy": False,
|
||||
"show_nav_strategy_records": False,
|
||||
"show_nav_records": True,
|
||||
"show_nav_stats": True,
|
||||
# CoinOX: 已去掉交易记录与复盘 / 全站统计分析
|
||||
"show_nav_records": False,
|
||||
"show_nav_stats": False,
|
||||
"show_nav_risk_policy": True,
|
||||
"show_nav_system_guide": False,
|
||||
"show_nav_env_config": True,
|
||||
@@ -75,6 +76,16 @@ def normalize_display_prefs(raw: dict | None) -> dict[str, bool]:
|
||||
for key in DEFAULT_INSTANCE_DISPLAY:
|
||||
if key in raw:
|
||||
out[key] = bool(raw[key])
|
||||
# CoinOX 产品面强制隐藏已下线入口(忽略库里旧开关)
|
||||
out["show_nav_records"] = False
|
||||
out["show_nav_stats"] = False
|
||||
out["show_nav_dashboard"] = False
|
||||
out["show_nav_account_ledger"] = False
|
||||
out["show_nav_key_monitor"] = False
|
||||
out["show_nav_trade"] = False
|
||||
out["show_nav_strategy"] = False
|
||||
out["show_nav_strategy_records"] = False
|
||||
out["show_nav_system_guide"] = False
|
||||
return out
|
||||
|
||||
|
||||
@@ -117,21 +128,13 @@ def tab_allowed(tab: str, display: Optional[dict[str, bool]] = None) -> bool:
|
||||
|
||||
|
||||
def display_meta_for_ui() -> list[dict[str, Any]]:
|
||||
# CoinOX 顶栏仅保留期权/对冲相关入口
|
||||
nav_keys = [
|
||||
"show_nav_dashboard",
|
||||
"show_nav_account_ledger",
|
||||
"show_nav_key_monitor",
|
||||
"show_nav_trade",
|
||||
"show_nav_strategy",
|
||||
"show_nav_strategy_records",
|
||||
"show_nav_records",
|
||||
"show_nav_stats",
|
||||
"show_nav_risk_policy",
|
||||
"show_nav_system_guide",
|
||||
"show_nav_env_config",
|
||||
"show_nav_options",
|
||||
"show_nav_options_review",
|
||||
"show_nav_hedge_plan",
|
||||
"show_nav_risk_policy",
|
||||
"show_nav_env_config",
|
||||
]
|
||||
settings_keys = [
|
||||
"show_settings_transfer",
|
||||
|
||||
Reference in New Issue
Block a user