feat(websocket): 实现WebSocket消息监听和调试功能
- 添加WebSocketMessageListener组件用于全局消息监听- 新增WebSocketDebugPanel调试面板(仅开发环境显示) - 在多个组件中实现基于subscriptionId的WebSocket连接管理 -为MAA和通用配置添加更可靠的连接生命周期控制 - 引入消息测试页面用于调试WebSocket消息处理- 更新调度器逻辑以支持新的WebSocket订阅机制 - 优化WebSocket连接的创建、维护和断开流程 - 添加开发环境下的调度中心调试工具导入- 重构WebSocket相关组件的导入和注册方式 - 移除冗余的电源倒计时相关状态和方法
This commit is contained in:
@@ -44,7 +44,7 @@ contextBridge.exposeInMainWorld('electronAPI', {
|
||||
saveConfig: (config: any) => ipcRenderer.invoke('save-config', config),
|
||||
loadConfig: () => ipcRenderer.invoke('load-config'),
|
||||
resetConfig: () => ipcRenderer.invoke('reset-config'),
|
||||
|
||||
|
||||
// 托盘设置实时更新
|
||||
updateTraySettings: (uiSettings: any) => ipcRenderer.invoke('update-tray-settings', uiSettings),
|
||||
|
||||
@@ -54,7 +54,7 @@ contextBridge.exposeInMainWorld('electronAPI', {
|
||||
getLogs: (lines?: number, fileName?: string) => ipcRenderer.invoke('get-logs', lines, fileName),
|
||||
clearLogs: (fileName?: string) => ipcRenderer.invoke('clear-logs', fileName),
|
||||
cleanOldLogs: (daysToKeep?: number) => ipcRenderer.invoke('clean-old-logs', daysToKeep),
|
||||
|
||||
|
||||
// 保留原有方法以兼容现有代码
|
||||
saveLogsToFile: (logs: string) => ipcRenderer.invoke('save-logs-to-file', logs),
|
||||
loadLogsFromFile: () => ipcRenderer.invoke('load-logs-from-file'),
|
||||
|
||||
Reference in New Issue
Block a user