feat: remove unused hub nav items from user edition.

Drop plan/strategy/help/archive/quotes/logs from top nav and force their display prefs off.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-17 18:13:45 +08:00
parent 7e06db758d
commit d497d99a88
4 changed files with 41 additions and 109 deletions
+18 -6
View File
@@ -24,16 +24,26 @@ DEFAULT_DISPLAY = {
"show_account_pnl": True,
"show_nav_funds": True,
"show_nav_dashboard": True,
"show_nav_plan": True,
"show_nav_archive": True,
"show_nav_quotes": True,
"show_nav_plan": False,
"show_nav_archive": False,
"show_nav_quotes": False,
"show_nav_ai": True,
"show_nav_calculator": True,
"show_nav_strategy": True,
"show_nav_help": True,
"show_nav_logs": True,
"show_nav_strategy": False,
"show_nav_help": False,
"show_nav_logs": False,
}
# 用户版中控已下线的顶栏入口:读/写设置时强制关闭
REMOVED_NAV_DISPLAY_KEYS = (
"show_nav_plan",
"show_nav_archive",
"show_nav_quotes",
"show_nav_strategy",
"show_nav_help",
"show_nav_logs",
)
DEFAULT_EXCHANGES = [
{
"id": "0",
@@ -86,6 +96,8 @@ def normalize_display_prefs(raw: dict | None) -> dict:
for key in DEFAULT_DISPLAY:
if key in raw:
out[key] = bool(raw.get(key))
for key in REMOVED_NAV_DISPLAY_KEYS:
out[key] = False
return out