diff options
Diffstat (limited to 'public/App.js')
| -rw-r--r-- | public/App.js | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/public/App.js b/public/App.js index 7aac7f0..a91f298 100644 --- a/public/App.js +++ b/public/App.js @@ -782,10 +782,6 @@ export function updateState(payload) { } } -export function updateStreamState(message) { - setText("stream-state", message); -} - export function startPlaceholderPlayback() { replayIndex(0); setText("replay-button", "暂停占位演示"); @@ -879,10 +875,6 @@ export function connectToServer(selection) { eventSource(source); source.onmessage = ((event) => { updateState(JSON.parse(event.data)); - updateStreamState("实时链路 · SSE 已连接"); - }); - source.onerror = ((_arg) => { - updateStreamState("实时链路 · 等待自动重连"); }); } @@ -1003,7 +995,6 @@ export function startRun(selection) { body: JSON.stringify(requestBody), }; setText("run-message", "正在启动设计运行"); - updateStreamState("实时链路 · 等待服务端确认"); startImmediate(singleton.Delay(() => singleton.TryWith(singleton.Delay(() => singleton.Bind(awaitPromise(fetch("/api/runs/start", requestOptions)), (_arg) => { let arg; const response = _arg; @@ -1011,7 +1002,6 @@ export function startRun(selection) { return singleton.Bind(awaitPromise(response.json()), (_arg_1) => { updateState(_arg_1); connectToServer(selection); - updateStreamState("实时链路 · SSE 已连接"); return singleton.Zero(); }); } @@ -1022,12 +1012,10 @@ export function startRun(selection) { } else { setText("run-message", (arg = (response.status | 0), toText(printf("启动失败 · HTTP %d"))(arg))); - updateStreamState("实时链路 · 启动失败"); return singleton.Zero(); } })), (_arg_2) => { setText("run-message", "启动失败 · 无法连接服务端"); - updateStreamState("实时链路 · 连接失败"); return singleton.Zero(); }))); } |
