Files
puddy 843ff244a6 feat: 新增多插件 UI 支持及运行日志集中回传功能
本次提交包含多项功能更新:
1. 为多个插件(xq0002/0003/0004/0008/0010/0011/0020/0031_xq0032/0033/0035/0037/0045_xq0046/0047/0048)新增 UI 界面及配置支持
2. 新增运行日志集中回传功能,客户端自动上传运行日志到中心机集中存储
3. 新增插件分类字段支持,用于场景库分组管理
4. 优化 xq0034/0037/0048 等插件的功能及描述
5. 修复控制面响应兼容问题,支持新旧版本数据格式
6. 新增 xq0033 插件的状态存储模块,用于历史记录管理
7. 优化 CRM 登录窗口模式,支持全屏置顶
2026-10-26 15:42:50 +08:00

28 lines
1.1 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// preload:contextBridge 白名单 IPC(渲染层主通道走 HTTP 兼容层)。
// 暴露只读环境信息 + 无边框窗口控制(顶栏自绘窗口控制钮使用)。
"use strict";
const { contextBridge, ipcRenderer } = require("electron");
contextBridge.exposeInMainWorld("dshShell", {
platform: process.platform,
versions: {
electron: process.versions.electron,
node: process.versions.node,
chrome: process.versions.chrome,
},
// ---- 无边框窗口控制(顶栏 min/max/close) ----
winControl: {
minimize: () => ipcRenderer.send("win:min"),
toggleMaximize: () => ipcRenderer.send("win:max"),
close: () => ipcRenderer.send("win:close"),
// 订阅最大化状态变化(主进程 maximize/unmaximize 时推送 boolean)
onMaximized: (cb) => {
const handler = (_e, v) => cb(v);
ipcRenderer.on("win:maximized", handler);
return () => ipcRenderer.removeListener("win:maximized", handler);
},
},
// 渲染层可通过 window.open 打开中心机控制面(外部 URL 需在渲染层显式触发)
});