Skip to content

Commit 87d2647

Browse files
committed
fix: inject new backend URL in OOBE browser after server restart in local mode
1 parent f34c945 commit 87d2647

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

AquaMai

MaiChartManager/Controllers/App/OobeController.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,12 @@ public async Task<IActionResult> CompleteSetup([FromBody] CompleteSetupRequest r
133133
}
134134
ServerManager.StartApp(request.Export, (url) =>
135135
{
136-
if (StaticSettings.Config.Export) return;
136+
if (StaticSettings.Config.Export)
137+
{
138+
// 局域网模式:服务器重启后端口变了,需要把新 URL 注入回 OOBE 浏览器
139+
AppMain.UiContext?.Post(_ => AppMain.OobeBrowser?.InjectBackendUrl(url), null);
140+
return;
141+
}
137142
AppLifecycleManager.ShowBrowser(url);
138143
AppMain.UiContext?.Post(_ =>
139144
{

0 commit comments

Comments
 (0)