From 0f9a5c9a1c49639190ac2f7471ebc032c0deb0ec Mon Sep 17 00:00:00 2001 From: Pigbibi <20649888+Pigbibi@users.noreply.github.com> Date: Sun, 28 Jun 2026 01:27:00 +0800 Subject: [PATCH] Adjust cash policy layout and simplify run button area. Move reserved cash ratio to the left column beside margin control, widen the dispatch button to full width, and remove the bordered background wrapper around the run area. Co-authored-by: Cursor --- tests/strategy_switch_worker_validation.mjs | 2 + web/strategy-switch-console/index.html | 41 +++++++++++---------- web/strategy-switch-console/page_asset.js | 2 +- 3 files changed, 25 insertions(+), 20 deletions(-) diff --git a/tests/strategy_switch_worker_validation.mjs b/tests/strategy_switch_worker_validation.mjs index b14bf63..b313c8e 100644 --- a/tests/strategy_switch_worker_validation.mjs +++ b/tests/strategy_switch_worker_validation.mjs @@ -45,6 +45,8 @@ assert.ok(indexHtml.includes('qmt: { label: "QMT"')); assert.ok(indexHtml.includes('cn_industry_etf_rotation')); assert.ok(indexHtml.includes('id="income-layer-section"')); assert.ok(indexHtml.includes('id="option-overlay-section"')); +assert.ok(indexHtml.includes('id="margin-policy-stack"')); +assert.ok(indexHtml.includes('class="margin-policy-stack"')); assert.ok(indexHtml.includes('id="reserve-policy-stack"')); assert.ok(indexHtml.includes('class="reserve-policy-stack"')); assert.equal(indexHtml.match(/class="form-section dca-section"/g)?.length, 1); diff --git a/web/strategy-switch-console/index.html b/web/strategy-switch-console/index.html index bff399e..50af877 100644 --- a/web/strategy-switch-console/index.html +++ b/web/strategy-switch-console/index.html @@ -352,6 +352,12 @@ min-width: 0; } + .margin-policy-stack { + display: grid; + gap: 14px; + min-width: 0; + } + .reserve-policy-stack.policy-stack-muted { opacity: 0.58; } @@ -1068,17 +1074,12 @@ } .run-area { - grid-template-columns: minmax(0, 1fr) minmax(220px, 260px); - align-items: center; - gap: 12px 16px; - padding: 16px; - border: 1px solid rgba(215, 225, 235, 0.9); - border-radius: var(--radius-md); - background: - linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 251, 0.9)); + gap: 10px; + padding-top: 2px; } .run-button { + width: 100%; min-height: 58px; border-radius: 12px; background: @@ -1408,11 +1409,19 @@

允许融资与预留现金覆盖不能同时生效。

- +
+ + + +
diff --git a/web/strategy-switch-console/page_asset.js b/web/strategy-switch-console/page_asset.js index db3563f..b6a4731 100644 --- a/web/strategy-switch-console/page_asset.js +++ b/web/strategy-switch-console/page_asset.js @@ -1,2 +1,2 @@ // Generated by scripts/sync_strategy_switch_page_asset.py; do not edit by hand. -export const PAGE_HTML = "\n\n\n \n \n \n QuantRuntimeSettings Strategy Switch\n \n \n\n\n
\n
\n

策略切换

\n

选平台、目标账号和策略,一次执行完成切换。

\n
\n
\n \n \n \n \n
\n
\n\n
\n
\n 初始化控制台\n

读取策略配置

\n

正在读取登录状态、账号配置和当前状态。

\n
\n
\n
\n\n
\n \n\n
\n
\n
\n 当前平台\n

LongBridge

\n
\n\n \n\n \n\n
\n \n\n \n\n
\n 模式\n
\n \n \n
\n \n
\n\n
\n \n\n \n\n \n
\n\n
\n \n\n \n\n \n
\n\n
\n \n
\n\n
\n

现金与融资

\n

允许融资与预留现金覆盖不能同时生效。

\n \n
\n \n\n
\n \n\n \n\n \n
\n
\n
\n\n
\n \n\n \n
\n
\n\n
\n \n

登录后才可执行切换。

\n

\n
\n
\n\n \n
\n
\n\n \n\n\n"; +export const PAGE_HTML = "\n\n\n \n \n \n QuantRuntimeSettings Strategy Switch\n \n \n\n\n
\n
\n

策略切换

\n

选平台、目标账号和策略,一次执行完成切换。

\n
\n
\n \n \n \n \n
\n
\n\n
\n
\n 初始化控制台\n

读取策略配置

\n

正在读取登录状态、账号配置和当前状态。

\n
\n
\n
\n\n
\n \n\n
\n
\n
\n 当前平台\n

LongBridge

\n
\n\n \n\n \n\n
\n \n\n \n\n
\n 模式\n
\n \n \n
\n \n
\n\n
\n \n\n \n\n \n
\n\n
\n \n\n \n\n \n
\n\n
\n \n
\n\n
\n

现金与融资

\n

允许融资与预留现金覆盖不能同时生效。

\n \n
\n
\n \n\n \n
\n\n
\n \n\n \n
\n
\n
\n\n
\n \n\n \n
\n
\n\n
\n \n

登录后才可执行切换。

\n

\n
\n
\n\n \n
\n
\n\n \n\n\n";