feat(hub): settings toggles for funds and dashboard nav
Add show_nav_funds and show_nav_dashboard in hub_settings display prefs to hide top nav entries and redirect direct URL access. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -11,6 +11,8 @@ SETTINGS_PATH = DIR / "hub_settings.json"
|
||||
|
||||
DEFAULT_DISPLAY = {
|
||||
"show_account_pnl": True,
|
||||
"show_nav_funds": True,
|
||||
"show_nav_dashboard": True,
|
||||
}
|
||||
|
||||
DEFAULT_EXCHANGES = [
|
||||
@@ -72,8 +74,9 @@ def env_force_disabled_ids() -> set[str]:
|
||||
def normalize_display_prefs(raw: dict | None) -> dict:
|
||||
out = dict(DEFAULT_DISPLAY)
|
||||
if isinstance(raw, dict):
|
||||
if "show_account_pnl" in raw:
|
||||
out["show_account_pnl"] = bool(raw.get("show_account_pnl"))
|
||||
for key in DEFAULT_DISPLAY:
|
||||
if key in raw:
|
||||
out[key] = bool(raw.get(key))
|
||||
return out
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user