Files
Genarrative/apps/desktop-shell/src-tauri/tauri.conf.json
kdletters 199f02cf9f 接入桌面壳图片导入能力
新增 file.importImage 与 file.imageDropped HostBridge 能力

Tauri 壳通过系统图片选择和主窗口拖拽读取真实图片文件

H5 统一使用导入图片与拖入图片事件 facade

限制图片 MIME 与大小并避免暴露本机绝对路径

更新壳能力校验、测试和架构文档
2026-06-18 02:52:37 +08:00

35 lines
1.9 KiB
JSON

{
"$schema": "https://schema.tauri.app/config/2",
"productName": "Genarrative",
"version": "0.1.0",
"identifier": "world.genarrative.desktop",
"build": {
"beforeDevCommand": "npm --prefix ../.. run dev:web",
"beforeBuildCommand": "npm --prefix ../.. run build:raw && npm run typecheck",
"devUrl": "http://127.0.0.1:3000/?clientRuntime=native_app&clientType=native_app&hostShell=tauri_desktop&hostPlatform=unknown&hostVersion=0.1.0&bridgeVersion=1&hostCapabilities=host.getRuntime,appearance.getColorScheme,app.lifecycle,share.open,share.setTarget,navigation.openNativePage,app.openExternalUrl,app.setTitle,app.setBadgeCount,network.status,network.statusChanged,clipboard.writeText,file.exportText,file.exportImage,file.importImage,file.imageDropped",
"frontendDist": "../../../dist"
},
"app": {
"windows": [
{
"create": false,
"label": "main",
"url": "index.html?clientRuntime=native_app&clientType=native_app&hostShell=tauri_desktop&hostPlatform=unknown&hostVersion=0.1.0&bridgeVersion=1&hostCapabilities=host.getRuntime,appearance.getColorScheme,app.lifecycle,share.open,share.setTarget,navigation.openNativePage,app.openExternalUrl,app.setTitle,app.setBadgeCount,network.status,network.statusChanged,clipboard.writeText,file.exportText,file.exportImage,file.importImage,file.imageDropped",
"title": "Genarrative",
"width": 1280,
"height": 820,
"minWidth": 960,
"minHeight": 640
}
],
"security": {
"csp": "default-src 'self' customprotocol: asset: http://127.0.0.1:*; img-src 'self' asset: http://127.0.0.1:* https: data: blob:; media-src 'self' asset: http://127.0.0.1:* https: data: blob:; connect-src 'self' http://127.0.0.1:* https: ws://127.0.0.1:* wss:; script-src 'self'; style-src 'self' 'unsafe-inline'; frame-src 'self' http://127.0.0.1:*"
}
},
"bundle": {
"active": true,
"targets": "all",
"icon": ["icons/icon.png"]
}
}