收口桌面网络桥接响应边界

将 Tauri network.status 响应映射收口到 network 模块

让桌面 dispatch 只委托网络状态请求

同步桌面壳配置门禁和共享记忆
This commit is contained in:
2026-06-19 23:50:13 +08:00
parent 2f37a143f1
commit 3d4657432a
4 changed files with 18 additions and 8 deletions
+5 -2
View File
@@ -1793,16 +1793,19 @@ for (const snippet of [
if (
!desktopHostBridgeDispatchSource.includes(
'resolve_desktop_host_bridge_network_status().await',
'resolve_desktop_host_bridge_network_status(&request).await',
) ||
desktopHostBridgeDispatchSource.includes('resolve_desktop_network_status') ||
desktopHostBridgeDispatchSource.includes('spawn_blocking(resolve_desktop_network_status)')
desktopHostBridgeDispatchSource.includes('spawn_blocking(resolve_desktop_network_status)') ||
desktopHostBridgeDispatchSource.includes('Err(error) => failed(request.id, "host_error"')
) {
throw new Error('desktop shell network HostBridge method must delegate to network module');
}
for (const snippet of [
'resolve_desktop_host_bridge_network_status',
'resolve_desktop_host_bridge_network_status_payload',
'spawn_blocking(resolve_desktop_network_status)',
'failed(request.id.clone(), "host_error", error)',
]) {
if (!desktopHostBridgeNetworkSource.includes(snippet)) {
throw new Error(`desktop shell network module is missing ${snippet}`);