This commit is contained in:
root
2026-05-17 12:09:14 +00:00
parent a10ffe332d
commit ffdc887b8a
30 changed files with 728 additions and 111 deletions

View File

@@ -357,9 +357,11 @@ export default function LiveControlApp() {
const targetProc = currentProcRef.current.trim();
const requestId = ++urlConfigRequestSeqRef.current;
try {
const data = await fetchJson<{ content?: string }>(
`/get_url_config?process=${encodeURIComponent(targetProc)}`,
);
const params = new URLSearchParams({
process: targetProc,
_ts: String(Date.now()),
});
const data = await fetchJson<{ content?: string }>(`/get_url_config?${params}`);
if (requestId !== urlConfigRequestSeqRef.current || targetProc !== currentProcRef.current.trim()) return;
setUrlConfig(data.content || "");
} catch {
@@ -443,6 +445,7 @@ export default function LiveControlApp() {
const proc = (processOverride ?? currentProc).trim();
if (!proc) return;
const content = overrideContent ?? urlConfig;
const requestId = ++urlConfigRequestSeqRef.current;
setBusy("save:url");
try {
const params = new URLSearchParams({ process: proc });
@@ -451,6 +454,9 @@ export default function LiveControlApp() {
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ content }),
});
if (requestId === urlConfigRequestSeqRef.current && proc === currentProcRef.current.trim()) {
setUrlConfig(content);
}
notify(t("URL 配置已保存", "URL config saved"));
} catch (e) {
notify((e as Error).message);