Add hub usage help page with settings nav toggle.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -89,6 +89,7 @@ from lib.hub.hub_entry_plan_lib import (
|
||||
meta_payload as entry_plan_meta_payload,
|
||||
update_entry_plan,
|
||||
)
|
||||
from lib.hub.hub_help_lib import help_meta_payload, load_help_payload
|
||||
from lib.hub.hub_strategy_lib import (
|
||||
build_export_html,
|
||||
build_print_html,
|
||||
@@ -983,6 +984,7 @@ def root_redirect():
|
||||
@app.get("/funds")
|
||||
@app.get("/ai")
|
||||
@app.get("/strategy")
|
||||
@app.get("/help")
|
||||
@app.get("/logs")
|
||||
@app.get("/settings")
|
||||
def shell_pages():
|
||||
@@ -1094,6 +1096,7 @@ class SettingsDisplayBody(BaseModel):
|
||||
show_nav_ai: bool = True
|
||||
show_nav_calculator: bool = True
|
||||
show_nav_strategy: bool = True
|
||||
show_nav_help: bool = True
|
||||
show_nav_logs: bool = True
|
||||
|
||||
|
||||
@@ -3275,6 +3278,19 @@ def api_strategy_meta():
|
||||
return strategy_meta_payload()
|
||||
|
||||
|
||||
@app.get("/api/help/meta")
|
||||
def api_help_meta():
|
||||
return help_meta_payload()
|
||||
|
||||
|
||||
@app.get("/api/help/{section_key}")
|
||||
def api_help_section(section_key: str):
|
||||
try:
|
||||
return load_help_payload(section_key.strip().lower())
|
||||
except KeyError:
|
||||
return JSONResponse({"ok": False, "msg": "unknown section"}, status_code=404)
|
||||
|
||||
|
||||
@app.get("/api/system-logs/meta")
|
||||
def api_system_logs_meta():
|
||||
return system_logs_meta()
|
||||
|
||||
Reference in New Issue
Block a user