From 849864d49343cfba4dac04f27acdfb795acc1bac Mon Sep 17 00:00:00 2001 From: Pigbibi <20649888+Pigbibi@users.noreply.github.com> Date: Tue, 9 Jun 2026 04:03:31 +0800 Subject: [PATCH] Refine strategy switch console options --- docs/index.html | 18 +++++++----------- web/strategy-switch-console/page_asset.js | 2 +- web/strategy-switch-console/worker.js | 2 +- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/docs/index.html b/docs/index.html index 18e8383..dace9c5 100644 --- a/docs/index.html +++ b/docs/index.html @@ -563,7 +563,7 @@

LongBridge

-

公开页面只能查看;登录版校验账号权限后才会触发 workflow。

+

登录后才可执行切换。

@@ -576,7 +576,6 @@

切换摘要

- default
@@ -599,6 +598,7 @@

切换摘要

const strategyOptions = [ "tqqq_growth_income", + "soxl_soxx_trend_income", "global_etf_rotation", "russell_1000_multi_factor_defensive", "mega_cap_leader_rotation_top50_balanced", @@ -606,6 +606,7 @@

切换摘要

const strategyLabels = { tqqq_growth_income: "TQQQ Growth Income", + soxl_soxx_trend_income: "SOXL/SOXX Trend Income", global_etf_rotation: "Global ETF Rotation", russell_1000_multi_factor_defensive: "Russell 1000 Defensive", mega_cap_leader_rotation_top50_balanced: "Mega Cap Top 50", @@ -670,8 +671,8 @@

切换摘要

loginToRun: "登录后切换", configureAccounts: "配置账号后切换", runSwitch: "一键切换", - readonlyNote: "公开页面只能查看;登录版校验账号权限后才会触发 workflow。", - missingConfigNote: "还没有加载私有账号配置,禁止执行,避免账号不匹配。", + readonlyNote: "登录后才可执行切换。", + missingConfigNote: "账号配置未加载,暂时不能执行。", readyNote: "点击后会触发 workflow,并同步目标平台服务。", noAccount: "没有账号选项", repository: "平台仓库", @@ -689,8 +690,6 @@

切换摘要

dispatched: "已触发 workflow", dispatchFailed: "触发失败", targetMeta: "target {target} · service {service}", - defaultConfig: "公开示例", - privateConfig: "私有账号", }, en: { appTitle: "Strategy Switch", @@ -707,8 +706,8 @@

切换摘要

loginToRun: "Sign in to switch", configureAccounts: "Configure accounts", runSwitch: "Switch now", - readonlyNote: "Public page is read-only; the Worker checks login before dispatching the workflow.", - missingConfigNote: "Private account config is not loaded, so switching is disabled.", + readonlyNote: "Sign in to switch.", + missingConfigNote: "Account config is not loaded, so switching is disabled.", readyNote: "This dispatches the workflow and syncs the target platform service.", noAccount: "No accounts", repository: "Repository", @@ -726,8 +725,6 @@

切换摘要

dispatched: "Workflow dispatched", dispatchFailed: "Dispatch failed", targetMeta: "target {target} · service {service}", - defaultConfig: "Public sample", - privateConfig: "Private accounts", }, }; @@ -903,7 +900,6 @@

切换摘要

`).join(""); el("mode-pill").textContent = inputs.execution_mode; - el("config-source").textContent = state.configSource === "private" ? t("privateConfig") : t("defaultConfig"); } function renderAuth() { diff --git a/web/strategy-switch-console/page_asset.js b/web/strategy-switch-console/page_asset.js index 7c58fab..1b223be 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

LongBridge

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

公开页面只能查看;登录版校验账号权限后才会触发 workflow。

\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

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 93a66ec..0b9dbf0 100644 --- a/web/strategy-switch-console/worker.js +++ b/web/strategy-switch-console/worker.js @@ -510,7 +510,7 @@ function assertSwitchIntent(inputs) { } function assertConfiguredAccount(inputs, accountOptions) { - if (!accountOptions) throw new Error("private account options are not configured"); + if (!accountOptions) throw new Error("account options are not configured"); const options = accountOptions[inputs.platform] || []; if (!options.length) throw new Error(`no account options configured for ${inputs.platform}`); const matched = options.some((option) => accountOptionMatchesInputs(option, inputs));