diff --git a/tests/strategy_switch_worker_validation.mjs b/tests/strategy_switch_worker_validation.mjs
index e6057c7..680114e 100644
--- a/tests/strategy_switch_worker_validation.mjs
+++ b/tests/strategy_switch_worker_validation.mjs
@@ -13,6 +13,7 @@ assert.equal(indexHtml.includes(".innerHTML"), false);
assert.ok(indexHtml.includes('
'));
assert.ok(indexHtml.includes('id="boot-screen"'));
assert.ok(indexHtml.includes('id="app-shell"'));
+assert.ok(indexHtml.includes('publicSummary: "公开预览"'));
assert.match(indexHtml, /body\.app-loading \.shell\s*\{\s*display: none;/);
const headers = __test.responseHeaders({ "Content-Type": "text/html; charset=utf-8" });
diff --git a/web/strategy-switch-console/index.html b/web/strategy-switch-console/index.html
index e4392d7..04e007b 100644
--- a/web/strategy-switch-console/index.html
+++ b/web/strategy-switch-console/index.html
@@ -845,6 +845,7 @@ 切换摘要
live: "实盘",
paper: "Dry run",
summary: "当前配置状态",
+ publicSummary: "公开预览",
copySummary: "复制状态",
loginToRun: "登录后切换",
loadingConfig: "读取配置中",
@@ -894,6 +895,7 @@ 切换摘要
live: "Live",
paper: "Dry run",
summary: "Current Config",
+ publicSummary: "Public Preview",
copySummary: "Copy state",
loginToRun: "Sign in to switch",
loadingConfig: "Loading config",
@@ -1197,13 +1199,16 @@ 切换摘要
function summaryRows(inputs) {
const account = selectedAccount();
const currentProfile = currentStrategyForAccount(state.selected, account);
- return [
+ const rows = [
[t("repository"), repositories[state.selected]],
[t("selectedAccount"), account.label],
- [t("currentStrategy"), currentProfile ? strategyLabel(currentProfile) : t("notRead")],
[t("selectedMarket"), supportedDomainLabel(state.selected, account)],
[t("nextStrategy"), strategyLabel(inputs.strategy_profile)],
];
+ if (state.auth.allowed) {
+ rows.splice(2, 0, [t("currentStrategy"), currentProfile ? strategyLabel(currentProfile) : t("notRead")]);
+ }
+ return rows;
}
function applyLanguage() {
@@ -1292,6 +1297,7 @@ 切换摘要
const inputs = buildInputs();
const list = el("summary-list");
list.replaceChildren();
+ document.querySelector(".summary-head h2").textContent = state.auth.allowed ? t("summary") : t("publicSummary");
for (const [label, value] of summaryRows(inputs)) {
const row = document.createElement("div");
row.className = "summary-row";
@@ -1303,10 +1309,7 @@ 切换摘要
list.appendChild(row);
}
- const account = selectedAccount();
- const currentEntry = currentEntryForAccount(state.selected, account);
- const currentMode = normalizeExecutionMode(currentEntry?.execution_mode, currentEntry?.dry_run_only);
- el("mode-pill").textContent = currentMode ? modeLabel(currentMode) : t("notRead");
+ el("mode-pill").textContent = modeLabel(inputs.execution_mode);
}
function renderAuth() {
diff --git a/web/strategy-switch-console/page_asset.js b/web/strategy-switch-console/page_asset.js
index 79393dc..6ddf0ef 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
\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
\n
登录后才可执行切换。
\n
\n
\n
\n\n \n \n \n\n \n\n\n";