chore(platforms): seperating permissions and inits on different platforms

This commit is contained in:
2025-04-22 15:26:41 +01:00
parent 191ed3db40
commit 169b95c450
7 changed files with 660 additions and 301 deletions

View File

@@ -1,35 +0,0 @@
{
"$schema": "../gen/schemas/desktop-schema.json",
"identifier": "default",
"description": "Capability for the main window",
"windows": ["main"],
"permissions": [
"core:default",
"core:window:allow-start-dragging",
"http:default",
"core:window:allow-show",
"core:window:allow-set-focus",
{
"path": "$APPDATA/databases/*"
}
]
},
{
"identifier": "http:default",
"allow": [
{
"url": "https://haystack.johncosta.tech"
},
{
"url": "http://localhost:3040"
},
{
"url": "http://192.168.1.199:3040"
}
]
},
"log:default",
"fs:default",
"fs:default"
]
}

View File

@@ -0,0 +1,16 @@
identifier = "Desktop"
description = "Capabilities for desktop platforms"
windows = ["main"]
platforms = ["linux", "macOS", "windows"]
permissions = [
"core:default",
"core:window:allow-start-dragging",
"fs:default",
"http:default",
{ identifier = "http:default", allow = [
{ url = "https://haystack.johncosta.tech" },
{ url = "http://localhost:3040" },
{ url = "http://192.168.1.199:3040" }
] },
]

View File

@@ -0,0 +1,16 @@
identifier = "Mobile"
description = "Capabilities for mobile platforms"
windows = ["main"]
platforms = ["android", "iOS"]
permissions = [
"core:default",
"fs:default",
"http:default",
"sharetarget:default",
{ identifier = "http:default", allow = [
{ url = "https://haystack.johncosta.tech" },
{ url = "http://localhost:3040" },
{ url = "http://192.168.1.199:3040" }
] },
]