Fix composite margin ratio cap at 50% and add risk guide page with nav toggle.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-29 22:29:13 +08:00
parent 9a10ac8a51
commit 8b4b1a875c
14 changed files with 392 additions and 34 deletions
+15
View File
@@ -231,6 +231,7 @@ def _static_asset_v() -> str:
"static/css/responsive.css",
"static/css/trade.css",
"static/css/dashboard.css",
"static/css/doc.css",
"static/css/base.css",
)
mtimes = []
@@ -1644,6 +1645,20 @@ def dashboard():
return render_template("dashboard.html")
@app.route("/risk-guide")
@login_required
@require_nav("risk_guide")
def risk_guide():
from doc_render import read_doc, render_markdown
try:
_title, raw = read_doc("risk-guide")
except FileNotFoundError:
flash("文档不存在")
return redirect(url_for("positions"))
return render_template("risk_guide.html", doc_html=render_markdown(raw))
@app.route("/api/dashboard/live")
@login_required
def api_dashboard_live():