mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2026-03-21 04:49:46 +08:00
♻️ use opener instead of window.open/shell
This commit is contained in:
22
src-tauri/Cargo.lock
generated
22
src-tauri/Cargo.lock
generated
@@ -17,6 +17,7 @@ dependencies = [
|
||||
"tauri-plugin-fs",
|
||||
"tauri-plugin-http",
|
||||
"tauri-plugin-log",
|
||||
"tauri-plugin-opener",
|
||||
"tauri-plugin-os",
|
||||
"tauri-plugin-process",
|
||||
"tauri-plugin-shell",
|
||||
@@ -4981,6 +4982,27 @@ dependencies = [
|
||||
"time",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-opener"
|
||||
version = "2.2.6"
|
||||
source = "git+ssh://git@github.com/tauri-apps/plugins-workspace.git?branch=v2#c245f123ea944b5c103a0661adcdcab6f10efbf9"
|
||||
dependencies = [
|
||||
"dunce",
|
||||
"glob",
|
||||
"objc2-app-kit",
|
||||
"objc2-foundation 0.3.0",
|
||||
"open",
|
||||
"schemars",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"tauri",
|
||||
"tauri-plugin",
|
||||
"thiserror 2.0.12",
|
||||
"url",
|
||||
"windows",
|
||||
"zbus",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-os"
|
||||
version = "2.2.1"
|
||||
|
||||
@@ -59,6 +59,11 @@ features = ["unsafe-headers"]
|
||||
git = "ssh://git@github.com/tauri-apps/plugins-workspace.git"
|
||||
branch = "v2"
|
||||
|
||||
# opener 插件
|
||||
[dependencies.tauri-plugin-opener]
|
||||
git = "ssh://git@github.com/tauri-apps/plugins-workspace.git"
|
||||
branch = "v2"
|
||||
|
||||
# os 插件
|
||||
[dependencies.tauri-plugin-os]
|
||||
git = "ssh://git@github.com/tauri-apps/plugins-workspace.git"
|
||||
|
||||
@@ -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": "**" }] },
|
||||
|
||||
@@ -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"]
|
||||
|
||||
@@ -42,6 +42,7 @@ pub fn run() {
|
||||
.plugin(tauri_plugin_dialog::init())
|
||||
.plugin(tauri_plugin_fs::init())
|
||||
.plugin(tauri_plugin_http::init())
|
||||
.plugin(tauri_plugin_opener::init())
|
||||
.plugin(tauri_plugin_os::init())
|
||||
.plugin(tauri_plugin_process::init())
|
||||
.plugin(tauri_plugin_shell::init())
|
||||
|
||||
Reference in New Issue
Block a user