feat(desktop): Tauri mac shell around the web export
Black screen root cause: Tauri injects nonces into style-src, which makes WebKit drop 'unsafe-inline' and block react-native-web's inline style attributes. style-src is now excluded from CSP modification. Window opens on the home screen so the section menu is reachable. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wmf3K9nCoEsXvvwkmMnuiM
This commit is contained in:
48
desktop/src-tauri/tauri.conf.json
Normal file
48
desktop/src-tauri/tauri.conf.json
Normal file
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"$schema": "https://schema.tauri.app/config/2",
|
||||
"productName": "GTD",
|
||||
"version": "1.0.0",
|
||||
"identifier": "xyz.rehbock.gtd",
|
||||
"build": {
|
||||
"devUrl": "http://localhost:8081",
|
||||
"beforeDevCommand": "scripts/dev-web.sh",
|
||||
"beforeBuildCommand": "scripts/export-web.sh",
|
||||
"frontendDist": "../../app/dist"
|
||||
},
|
||||
"app": {
|
||||
"windows": [
|
||||
{
|
||||
"label": "main",
|
||||
"title": "GTD",
|
||||
"url": "index.html",
|
||||
"width": 1100,
|
||||
"height": 750,
|
||||
"minWidth": 800,
|
||||
"minHeight": 600,
|
||||
"center": true
|
||||
}
|
||||
],
|
||||
"security": {
|
||||
"dangerousDisableAssetCspModification": ["style-src"],
|
||||
"csp": {
|
||||
"default-src": "'self' tauri: asset: http://asset.localhost",
|
||||
"script-src": "'self' 'unsafe-inline' 'unsafe-eval' tauri: asset: http://asset.localhost blob: data:",
|
||||
"style-src": "'self' 'unsafe-inline' tauri: asset: http://asset.localhost blob: data:",
|
||||
"img-src": "'self' tauri: asset: http://asset.localhost blob: data:",
|
||||
"font-src": "'self' tauri: asset: http://asset.localhost blob: data:",
|
||||
"connect-src": "'self' ipc: http://ipc.localhost tauri: asset: http://asset.localhost https://gtd.rehbock.xyz",
|
||||
"media-src": "'self' tauri: asset: http://asset.localhost blob: data:"
|
||||
}
|
||||
}
|
||||
},
|
||||
"bundle": {
|
||||
"active": true,
|
||||
"targets": ["app", "dmg"],
|
||||
"icon": ["icons/icon.icns", "icons/icon.ico", "icons/32x32.png", "icons/128x128.png", "icons/128x128@2x.png"],
|
||||
"category": "Productivity",
|
||||
"macOS": {
|
||||
"minimumSystemVersion": "11.0",
|
||||
"hardenedRuntime": true
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user