Add key monitor and live trade toggles to instance nav display prefs.

Defaults stay on; users can hide them like other top-bar tabs.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-24 00:55:31 +08:00
parent ca499c6104
commit 890659f173
5 changed files with 26 additions and 5 deletions
@@ -9,6 +9,8 @@ DISPLAY_RUNTIME_PREFIX = "display."
DEFAULT_INSTANCE_DISPLAY: dict[str, bool] = {
"show_nav_dashboard": False,
"show_nav_key_monitor": True,
"show_nav_trade": True,
"show_nav_strategy": True,
"show_nav_strategy_records": True,
"show_nav_records": True,
@@ -28,6 +30,8 @@ DEFAULT_INSTANCE_DISPLAY: dict[str, bool] = {
DISPLAY_LABELS: dict[str, str] = {
"show_nav_dashboard": "数据看板",
"show_nav_key_monitor": "关键位监控",
"show_nav_trade": "实盘下单",
"show_nav_strategy": "策略交易",
"show_nav_strategy_records": "策略交易记录",
"show_nav_records": "交易记录与复盘",
@@ -47,6 +51,8 @@ DISPLAY_LABELS: dict[str, str] = {
NAV_TAB_ALLOWED: dict[str, str] = {
"dashboard": "show_nav_dashboard",
"key_monitor": "show_nav_key_monitor",
"trade": "show_nav_trade",
"strategy": "show_nav_strategy",
"strategy_records": "show_nav_strategy_records",
"records": "show_nav_records",
@@ -110,6 +116,8 @@ def tab_allowed(tab: str, display: Optional[dict[str, bool]] = None) -> bool:
def display_meta_for_ui() -> list[dict[str, Any]]:
nav_keys = [
"show_nav_dashboard",
"show_nav_key_monitor",
"show_nav_trade",
"show_nav_strategy",
"show_nav_strategy_records",
"show_nav_records",