b852157651
- 拦截器扩展:不再只拦 target=_blank,所有指向外部 http/https/mailto/tel 的 <a> 点击(含无 target 的普通外链)统一 preventDefault 交给 openExternalLink,修复 Tauri WebView 静默吞掉普通外链导致「没反应」 - openInAppWebView 改静态 import(消除动态 import 失败可能),打开失败 时兜底走系统浏览器,绝不让链接无响应 - CSP 增加 frame-src https: http: data:,允许容器 iframe 嵌入任意第三方 站点(原先 default-src 'self' 会把容器内容直接拦成白屏)
95 lines
2.8 KiB
JSON
95 lines
2.8 KiB
JSON
{
|
|
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
|
|
"productName": "YunOPC-Hub",
|
|
"identifier": "cn.pinesound.opc.hub",
|
|
"build": {
|
|
"frontendDist": "../dist-tauri",
|
|
"devUrl": "http://localhost:8093/tauri.html",
|
|
"beforeDevCommand": "vite --mode tauri",
|
|
"beforeBuildCommand": "npm run build:tauri-bootstrap"
|
|
},
|
|
"app": {
|
|
"withGlobalTauri": false,
|
|
"windows": [
|
|
{
|
|
"title": "云超服",
|
|
"width": 1280,
|
|
"height": 800,
|
|
"minWidth": 960,
|
|
"minHeight": 600,
|
|
"resizable": true,
|
|
"fullscreen": false,
|
|
"dragDropEnabled": false
|
|
}
|
|
],
|
|
"security": {
|
|
"csp": "default-src 'self'; connect-src 'self' http://127.0.0.1:* ws://127.0.0.1:* ipc: http://ipc.localhost https://opc.pinesound.cn; script-src 'self'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com; img-src 'self' asset: http://asset.localhost blob: data: https:; frame-src 'self' https: http: data:;"
|
|
}
|
|
},
|
|
"bundle": {
|
|
"active": true,
|
|
"targets": [
|
|
"app",
|
|
"dmg",
|
|
"nsis"
|
|
],
|
|
"icon": [
|
|
"icons/icon.icns",
|
|
"icons/icon.ico"
|
|
],
|
|
"resources": [
|
|
"binaries/qwenpaw-backend",
|
|
"binaries/python-runtime",
|
|
"binaries/node-runtime",
|
|
"LICENSE",
|
|
"LICENSE_QwenPaw",
|
|
"NOTICE"
|
|
],
|
|
"windows": {
|
|
"webviewInstallMode": {
|
|
"type": "downloadBootstrapper",
|
|
"silent": true
|
|
},
|
|
"nsis": {
|
|
"installerIcon": "../../scripts/pack/assets/icon.ico",
|
|
"uninstallerIcon": "../../scripts/pack/assets/icon.ico",
|
|
"installerHooks": "nsis-hooks.nsh",
|
|
"languages": [
|
|
"English",
|
|
"SimpChinese",
|
|
"Indonesian",
|
|
"Japanese",
|
|
"Russian",
|
|
"PortugueseBR",
|
|
"Vietnamese"
|
|
],
|
|
"customLanguageFiles": {
|
|
"English": "nsis-languages/English.nsh",
|
|
"SimpChinese": "nsis-languages/SimpChinese.nsh",
|
|
"Indonesian": "nsis-languages/Indonesian.nsh",
|
|
"Japanese": "nsis-languages/Japanese.nsh",
|
|
"Russian": "nsis-languages/Russian.nsh",
|
|
"PortugueseBR": "nsis-languages/PortugueseBR.nsh"
|
|
},
|
|
"compression": "zlib",
|
|
"displayLanguageSelector": false
|
|
}
|
|
},
|
|
"macOS": {
|
|
"minimumSystemVersion": "14.0"
|
|
},
|
|
"createUpdaterArtifacts": true
|
|
},
|
|
"plugins": {
|
|
"updater": {
|
|
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDkwRTBDNDRBRTJENTUxQTIKUldTaVVkWGlTc1Rna0lwZ3MzQ3J2KzFpZG5obExUT3B6SnRoeU4wcVJiZXRrN3B5Nlp4MzlLaWsK",
|
|
"endpoints": [
|
|
"https://opc.pinesound.cn/desktop-updates/latest.json"
|
|
],
|
|
"windows": {
|
|
"installMode": "passive"
|
|
}
|
|
}
|
|
},
|
|
"mainBinaryName": "yunopc-hub"
|
|
} |