From b77741ee2104d9d9d2f95166b9f2489d49e006aa Mon Sep 17 00:00:00 2001 From: dekun Date: Wed, 17 Jun 2026 10:59:45 +0800 Subject: [PATCH] fix(order): hide RR preview in fixed-RR mode and serve shared JS manual_order_rr_preview.js was not routed from repo static/, so hide logic never ran. Add Flask routes on four exchanges, default hidden in HTML, and toggleSltpMode visibility. Co-authored-by: Cursor --- crypto_monitor_binance/app.py | 8 ++++++++ crypto_monitor_binance/templates/index.html | 6 ++++-- crypto_monitor_gate/app.py | 8 ++++++++ crypto_monitor_gate/templates/index.html | 6 ++++-- crypto_monitor_gate_bot/app.py | 8 ++++++++ crypto_monitor_gate_bot/templates/index.html | 6 ++++-- crypto_monitor_okx/app.py | 8 ++++++++ crypto_monitor_okx/templates/index.html | 6 ++++-- 8 files changed, 48 insertions(+), 8 deletions(-) diff --git a/crypto_monitor_binance/app.py b/crypto_monitor_binance/app.py index 591dea3..ce07237 100644 --- a/crypto_monitor_binance/app.py +++ b/crypto_monitor_binance/app.py @@ -8896,6 +8896,7 @@ def api_reviews(): _REPO_STATIC_DIR = os.path.join(os.path.dirname(BASE_DIR), "static") _AI_REVIEW_RENDER_JS = os.path.join(_REPO_STATIC_DIR, "ai_review_render.js") _FORM_SUBMIT_GUARD_JS = os.path.join(_REPO_STATIC_DIR, "form_submit_guard.js") +_MANUAL_ORDER_RR_PREVIEW_JS = os.path.join(_REPO_STATIC_DIR, "manual_order_rr_preview.js") @app.route("/static/ai_review_render.js") @@ -8912,6 +8913,13 @@ def static_form_submit_guard_js(): return send_file(_FORM_SUBMIT_GUARD_JS, mimetype="application/javascript; charset=utf-8") +@app.route("/static/manual_order_rr_preview.js") +def static_manual_order_rr_preview_js(): + if not os.path.isfile(_MANUAL_ORDER_RR_PREVIEW_JS): + return Response("not found", status=404, mimetype="text/plain; charset=utf-8") + return send_file(_MANUAL_ORDER_RR_PREVIEW_JS, mimetype="application/javascript; charset=utf-8") + + @app.route("/export/review_md/") @login_required def export_review_md(rid): diff --git a/crypto_monitor_binance/templates/index.html b/crypto_monitor_binance/templates/index.html index f467954..27cfe1e 100644 --- a/crypto_monitor_binance/templates/index.html +++ b/crypto_monitor_binance/templates/index.html @@ -396,7 +396,7 @@ - 预估盈亏比:— + @@ -823,7 +823,7 @@ - + - + - + - +