fix: portable 版 3D 拓扑设备位置 fallback 到主进程 JSON
Some checks failed
AI automation / Route event (push) Has been cancelled
AI automation / Hand reopened issue to maintainers (push) Has been cancelled
AI automation / Clean source issue state (push) Has been cancelled
AI automation / Reconcile handoffs (push) Has been cancelled
AI automation / Classify issue (push) Has been cancelled
AI automation / Claude Code smoke (push) Has been cancelled
AI automation / Review issue follow-up (push) Has been cancelled
AI automation / Publish issue follow-up (push) Has been cancelled
AI automation / Implement with Claude Code (push) Has been cancelled
AI automation / Publish implement PR (push) Has been cancelled
AI automation / Continue queued issue comments (push) Has been cancelled
AI automation / Codex review loop (push) Has been cancelled
AI automation / Publish Codex fix (push) Has been cancelled
AI automation / Clear Codex dispatch marker (push) Has been cancelled
AI automation / Own PR re-request Codex (push) Has been cancelled
AI automation / External PR re-request Codex (push) Has been cancelled
AI automation / Poll Codex reaction / retry (push) Has been cancelled
Some checks failed
AI automation / Route event (push) Has been cancelled
AI automation / Hand reopened issue to maintainers (push) Has been cancelled
AI automation / Clean source issue state (push) Has been cancelled
AI automation / Reconcile handoffs (push) Has been cancelled
AI automation / Classify issue (push) Has been cancelled
AI automation / Claude Code smoke (push) Has been cancelled
AI automation / Review issue follow-up (push) Has been cancelled
AI automation / Publish issue follow-up (push) Has been cancelled
AI automation / Implement with Claude Code (push) Has been cancelled
AI automation / Publish implement PR (push) Has been cancelled
AI automation / Continue queued issue comments (push) Has been cancelled
AI automation / Codex review loop (push) Has been cancelled
AI automation / Publish Codex fix (push) Has been cancelled
AI automation / Clear Codex dispatch marker (push) Has been cancelled
AI automation / Own PR re-request Codex (push) Has been cancelled
AI automation / External PR re-request Codex (push) Has been cancelled
AI automation / Poll Codex reaction / retry (push) Has been cancelled
renderer 原来只读 localStorage 的 monitoring-topology-positions, portable 版 userData 是全新空目录,Local Storage 里没有这个 key, 导致设备布局 fallback 到大圆圈自动布局。 加主进程 inspection-data.json 的同步 fallback: - preload/api.cjs 新增 getTopologyPositionsSync(ipcRenderer.sendSync) - index.cjs 新增 ipcMain.on 同步 handler(与 handle 并存) - MonitoringTopologyView.tsx localStorage 找不到时 fallback 读主进程 JSON
This commit is contained in:
@@ -2122,6 +2122,10 @@ function createPreloadApi(ctx) {
|
||||
// 拓扑位置持久化(供远程浏览器同步读取)
|
||||
saveTopologyPositions: (positions) => ipcRenderer.invoke("inspection:saveTopologyPositions", positions),
|
||||
getTopologyPositions: () => ipcRenderer.invoke("inspection:getTopologyPositions"),
|
||||
// 同步版本 — renderer 3D 布局同步加载位置时用(portable 版 localStorage 为空时 fallback 读主进程 JSON)
|
||||
getTopologyPositionsSync: () => {
|
||||
try { return ipcRenderer.sendSync("inspection:getTopologyPositions"); } catch { return null; }
|
||||
},
|
||||
// 监控大屏标题同步
|
||||
saveDashboardTitle: (title) => ipcRenderer.invoke("inspection:saveDashboardTitle", title),
|
||||
getDashboardTitle: () => ipcRenderer.invoke("inspection:getDashboardTitle"),
|
||||
|
||||
Reference in New Issue
Block a user