From 57e32cf88e9b1825fdcfd4fde70a7e83e33011d8 Mon Sep 17 00:00:00 2001 From: Pigbibi <20649888+Pigbibi@users.noreply.github.com> Date: Tue, 9 Jun 2026 04:35:44 +0800 Subject: [PATCH] Make strategy switch console Worker-only --- .github/workflows/validate.yml | 2 +- README.md | 4 +- README.zh-CN.md | 4 +- docs/github_pages_strategy_switch.md | 110 ------------------ docs/github_pages_strategy_switch.zh-CN.md | 110 ------------------ docs/manual_strategy_switch_web.html | 12 -- scripts/sync_strategy_switch_page_asset.py | 4 +- web/strategy-switch-console/README.md | 9 +- web/strategy-switch-console/README.zh-CN.md | 8 +- .../account-options.example.json | 24 ++-- .../strategy-switch-console}/index.html | 40 ++++++- web/strategy-switch-console/page_asset.js | 2 +- web/strategy-switch-console/worker.js | 1 + 13 files changed, 68 insertions(+), 262 deletions(-) delete mode 100644 docs/github_pages_strategy_switch.md delete mode 100644 docs/github_pages_strategy_switch.zh-CN.md delete mode 100644 docs/manual_strategy_switch_web.html rename {docs => web/strategy-switch-console}/index.html (94%) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index e5df93d..98ae4d0 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -24,6 +24,6 @@ jobs: set -euo pipefail python3 scripts/sync_strategy_switch_page_asset.py git diff --exit-code -- web/strategy-switch-console/page_asset.js - sed -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

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"; diff --git a/web/strategy-switch-console/worker.js b/web/strategy-switch-console/worker.js index 0b9dbf0..c3ad332 100644 --- a/web/strategy-switch-console/worker.js +++ b/web/strategy-switch-console/worker.js @@ -586,6 +586,7 @@ function cleanAccountOption(item, platform, index) { addConfigOptional(option, "deployment_selector", item.deployment_selector, cleanSlug); addConfigOptional(option, "account_scope", item.account_scope, cleanSlug); addConfigOptional(option, "service_name", item.service_name, cleanSlug); + addConfigOptional(option, "default_strategy_profile", item.default_strategy_profile || item.strategy_profile, cleanSlug); addConfigOptional(option, "github_environment", item.github_environment, cleanSlug); addConfigOptional(option, "variable_scope", item.variable_scope, (value, field) => cleanChoice(value || "default", ["default", "repository", "environment"], field),