现象:画布内网页节点建得起来,但画布一动网页就永久消失,用户看到一直是一块空白。 根因(最小 Tauri 工程实测):macOS 上对 Window::add_child 创建的子 webview 调 hide() 之后再 show(),两个调用都返回 Ok,网页却再也不出现。而位置同步引擎 在每次快速平移/缩放/拖动时都会先隐藏,所以拖一次画布就再也回不来。 - bounds 改为把视图挪到窗口外(-20000,-20000)代替 hide:NSView 在父视图外 不绘制也不接收事件,效果等价,且移回原位有效(同一工程验证) - ensure 失败回滚 open 并 1.5s 重试;bounds 返回找不到 webview 时同样回滚重建 (原实现先置 open=true 再请求,一次失败就永久卡在「已创建」) - 新增 _cwv.log 诊断日志 + page:started/finished 事件;创建失败/加载超时才 把原因写进节点,不再让用户面对无法解释的空白 - 模态遮罩只认真正可见的(尺寸>=8x8),避免常驻 display:none 的遮罩让网页永不显示 版本 3.25.25
55 lines
1.8 KiB
JSON
55 lines
1.8 KiB
JSON
{
|
|
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
|
|
"productName": "image-workbench",
|
|
"version": "3.25.25",
|
|
"identifier": "com.malongan.imageworkbench",
|
|
"build": {
|
|
"frontendDist": "../dist",
|
|
"beforeDevCommand": "npm run build",
|
|
"beforeBuildCommand": "npm run lint && npm run build && node scripts/strip-plugins.js"
|
|
},
|
|
"app": {
|
|
"withGlobalTauri": true,
|
|
"windows": [
|
|
{
|
|
"label": "main",
|
|
"title": "无限画布",
|
|
"width": 1440,
|
|
"height": 900,
|
|
"minWidth": 1024,
|
|
"minHeight": 640,
|
|
"resizable": true,
|
|
"fullscreen": false,
|
|
"center": true,
|
|
"dragDropEnabled": false
|
|
}
|
|
],
|
|
"security": {
|
|
"csp": "default-src 'self'; script-src 'self' blob:; worker-src 'self' blob:; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob: https:; font-src 'self' data:; connect-src 'self' ipc: http://ipc.localhost https: blob: data: http://127.0.0.1:30092 http://localhost:30092; object-src 'none'; base-uri 'none'; frame-ancestors 'none'"
|
|
}
|
|
},
|
|
"bundle": {
|
|
"active": true,
|
|
"targets": "all",
|
|
"category": "GraphicsAndDesign",
|
|
"shortDescription": "无限画布 · 生图工作台",
|
|
"longDescription": "节点式无限画布,本地编排与生成图片,支持系统原生另存为。",
|
|
"icon": [
|
|
"icons/32x32.png",
|
|
"icons/128x128.png",
|
|
"icons/[email protected]",
|
|
"icons/icon.icns",
|
|
"icons/icon.ico"
|
|
],
|
|
"createUpdaterArtifacts": true
|
|
},
|
|
"plugins": {
|
|
"updater": {
|
|
"endpoints": [
|
|
"https://download.maqiart.eu.org/updates/latest.json"
|
|
],
|
|
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDE3QUU1N0QwQUM5RjE1RjEKUldUeEZaK3MwRmV1RnhjNVhhSlhaSHkvbVRXNDdscHpOa0s0VHF4NHBBQVJBdDQ0dEVlck5FeEsK"
|
|
}
|
|
}
|
|
}
|