♻️ use opener instead of window.open/shell

This commit is contained in:
目棃
2025-03-18 14:52:00 +08:00
parent 765c860473
commit 01dc6a6ea7
17 changed files with 213 additions and 217 deletions

View File

@@ -14,6 +14,7 @@
"core:window:default",
"core:path:allow-resolve-directory",
"core:path:default",
"opener:default",
{ "identifier": "fs:allow-exists", "allow": [{ "path": "**" }] },
{ "identifier": "fs:allow-mkdir", "allow": [{ "path": "**" }] },
{ "identifier": "fs:allow-read-dir", "allow": [{ "path": "**" }] },

View File

@@ -37,6 +37,7 @@
"core:window:allow-set-focus",
"core:window:allow-show",
"core:window:allow-unminimize",
"opener:default",
{ "identifier": "fs:allow-exists", "allow": [{ "path": "**" }] },
{ "identifier": "fs:allow-mkdir", "allow": [{ "path": "**" }] },
{ "identifier": "fs:allow-read-dir", "allow": [{ "path": "**" }] },
@@ -44,6 +45,7 @@
{ "identifier": "fs:allow-remove", "allow": [{ "path": "**" }] },
{ "identifier": "fs:allow-write-file", "allow": [{ "path": "**" }] },
{ "identifier": "fs:allow-write-text-file", "allow": [{ "path": "**" }] },
{ "identifier": "opener:allow-open-path", "allow": [{ "path": "**" }] },
{
"identifier": "http:default",
"allow": [
@@ -55,11 +57,7 @@
},
{
"identifier": "shell:allow-execute",
"allow": [
{ "name": "win_open", "cmd": "explorer", "args": true },
{ "name": "mac_open", "cmd": "open", "args": true },
{ "name": "exec-sh", "cmd": "powershell", "args": true }
]
"allow": [{ "name": "exec-sh", "cmd": "powershell", "args": true }]
}
],
"platforms": ["windows", "macOS"]