diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 16e0c0a0..f774c803 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -276,17 +276,6 @@ dependencies = [ "futures-lite 1.13.0", ] -[[package]] -name = "async-fs" -version = "2.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebcd09b382f40fcd159c2d695175b2ae620ffa5f3bd6f664131efff4e8b9e04a" -dependencies = [ - "async-lock 3.4.0", - "blocking", - "futures-lite 2.6.0", -] - [[package]] name = "async-io" version = "1.13.0" @@ -374,25 +363,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "async-process" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63255f1dc2381611000436537bbedfe83183faa303a5a0edaf191edef06526bb" -dependencies = [ - "async-channel 2.3.1", - "async-io 2.4.0", - "async-lock 3.4.0", - "async-signal", - "async-task", - "blocking", - "cfg-if", - "event-listener 5.3.0", - "futures-lite 2.6.0", - "rustix 0.38.44", - "tracing", -] - [[package]] name = "async-recursion" version = "1.1.1" @@ -1118,7 +1088,6 @@ dependencies = [ "tauri-plugin-dialog", "tauri-plugin-fs", "tauri-plugin-global-shortcut", - "tauri-plugin-notification", "tauri-plugin-process", "tauri-plugin-shell", "tauri-plugin-updater", @@ -1761,16 +1730,6 @@ dependencies = [ "dirs-sys 0.5.0", ] -[[package]] -name = "dirs-next" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" -dependencies = [ - "cfg-if", - "dirs-sys-next", -] - [[package]] name = "dirs-sys" version = "0.3.7" @@ -1794,17 +1753,6 @@ dependencies = [ "windows-sys 0.59.0", ] -[[package]] -name = "dirs-sys-next" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" -dependencies = [ - "libc", - "redox_users 0.4.6", - "winapi", -] - [[package]] name = "dispatch" version = "0.2.0" @@ -3795,19 +3743,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" -[[package]] -name = "mac-notification-sys" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dce8f34f3717aa37177e723df6c1fc5fb02b2a1087374ea3fe0ea42316dc8f91" -dependencies = [ - "cc", - "dirs-next", - "objc-foundation", - "objc_id", - "time", -] - [[package]] name = "malloc_buf" version = "0.0.6" @@ -4195,20 +4130,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8" -[[package]] -name = "notify-rust" -version = "4.11.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fa3b9f2364a09bd359aa0206702882e208437450866a374d5372d64aece4029" -dependencies = [ - "futures-lite 2.6.0", - "log", - "mac-notification-sys", - "serde", - "tauri-winrt-notification", - "zbus", -] - [[package]] name = "ntapi" version = "0.4.1" @@ -4370,17 +4291,6 @@ dependencies = [ "malloc_buf", ] -[[package]] -name = "objc-foundation" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9" -dependencies = [ - "block", - "objc", - "objc_id", -] - [[package]] name = "objc-sys" version = "0.3.5" @@ -4645,15 +4555,6 @@ dependencies = [ "objc2-foundation 0.3.0", ] -[[package]] -name = "objc_id" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b" -dependencies = [ - "objc", -] - [[package]] name = "object" version = "0.36.7" @@ -5411,15 +5312,6 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" -[[package]] -name = "quick-xml" -version = "0.31.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1004a344b30a54e2ee58d66a71b32d2db2feb0a31f9a2d302bf0536f15de2a33" -dependencies = [ - "memchr", -] - [[package]] name = "quick-xml" version = "0.32.0" @@ -6570,11 +6462,11 @@ checksum = "13f2b548cd8447f8de0fdf1c592929f70f4fc7039a05e47404b0d096ec6987a1" dependencies = [ "async-channel 1.9.0", "async-executor", - "async-fs 1.6.0", + "async-fs", "async-io 1.13.0", "async-lock 2.8.0", "async-net", - "async-process 1.8.1", + "async-process", "blocking", "futures-lite 1.13.0", ] @@ -7176,25 +7068,6 @@ dependencies = [ "thiserror 2.0.12", ] -[[package]] -name = "tauri-plugin-notification" -version = "2.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c474c7cc524385e682ccc1e149e13913a66fd8586ac4c2319cf01b78f070d309" -dependencies = [ - "log", - "notify-rust", - "rand 0.8.5", - "serde", - "serde_json", - "serde_repr", - "tauri", - "tauri-plugin", - "thiserror 2.0.12", - "time", - "url", -] - [[package]] name = "tauri-plugin-process" version = "2.2.0" @@ -7369,17 +7242,6 @@ dependencies = [ "toml", ] -[[package]] -name = "tauri-winrt-notification" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f89f5fb70d6f62381f5d9b2ba9008196150b40b75f3068eb24faeddf1c686871" -dependencies = [ - "quick-xml 0.31.0", - "windows 0.56.0", - "windows-version", -] - [[package]] name = "tempfile" version = "3.19.1" @@ -8721,16 +8583,6 @@ dependencies = [ "windows-version", ] -[[package]] -name = "windows" -version = "0.56.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1de69df01bdf1ead2f4ac895dc77c9351aefff65b2f3db429a343f9cbf05e132" -dependencies = [ - "windows-core 0.56.0", - "windows-targets 0.52.6", -] - [[package]] name = "windows" version = "0.57.0" @@ -8782,18 +8634,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "windows-core" -version = "0.56.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4698e52ed2d08f8658ab0c39512a7c00ee5fe2688c65f8c0a4f06750d729f2a6" -dependencies = [ - "windows-implement 0.56.0", - "windows-interface 0.56.0", - "windows-result 0.1.2", - "windows-targets 0.52.6", -] - [[package]] name = "windows-core" version = "0.57.0" @@ -8842,17 +8682,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-implement" -version = "0.56.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6fc35f58ecd95a9b71c4f2329b911016e6bec66b3f2e6a4aad86bd2e99e2f9b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.100", -] - [[package]] name = "windows-implement" version = "0.57.0" @@ -8886,17 +8715,6 @@ dependencies = [ "syn 2.0.100", ] -[[package]] -name = "windows-interface" -version = "0.56.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08990546bf4edef8f431fa6326e032865f27138718c587dc21bc0265bbcb57cc" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.100", -] - [[package]] name = "windows-interface" version = "0.57.0" @@ -9553,15 +9371,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59c333f648ea1b647bc95dc1d34807c8e25ed7a6feff3394034dc4776054b236" dependencies = [ "async-broadcast", - "async-executor", - "async-fs 2.1.2", - "async-io 2.4.0", - "async-lock 3.4.0", - "async-process 2.3.0", "async-recursion", - "async-task", "async-trait", - "blocking", "enumflags2", "event-listener 5.3.0", "futures-core", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 8d23dbf4..b145a18b 100755 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -35,10 +35,10 @@ delay_timer = "0.11.6" parking_lot = "0.12" percent-encoding = "2.3.1" tokio = { version = "1.44", features = [ - "rt-multi-thread", - "macros", - "time", - "sync", + "rt-multi-thread", + "macros", + "time", + "sync", ] } serde = { version = "1.0", features = ["derive"] } reqwest = { version = "0.12", features = ["json", "rustls-tls", "cookies"] } @@ -47,17 +47,16 @@ sysproxy = { git = "https://github.com/clash-verge-rev/sysproxy-rs", rev = "3d74 image = "0.25.6" imageproc = "0.25.0" tauri = { version = "2.4.0", features = [ - "protocol-asset", - "devtools", - "tray-icon", - "image-ico", - "image-png", + "protocol-asset", + "devtools", + "tray-icon", + "image-ico", + "image-png", ] } network-interface = { version = "2.0.0", features = ["serde"] } tauri-plugin-shell = "2.2.0" tauri-plugin-dialog = "2.2.0" tauri-plugin-fs = "2.2.0" -tauri-plugin-notification = "2.2.2" tauri-plugin-process = "2.2.0" tauri-plugin-clipboard-manager = "2.2.2" tauri-plugin-deep-link = "2.2.0" diff --git a/src-tauri/capabilities/migrated.json b/src-tauri/capabilities/migrated.json index e5920910..67dc15cf 100644 --- a/src-tauri/capabilities/migrated.json +++ b/src-tauri/capabilities/migrated.json @@ -68,7 +68,6 @@ "shell:allow-spawn", "shell:allow-stdin-write", "dialog:allow-open", - "notification:default", "global-shortcut:allow-is-registered", "global-shortcut:allow-register", "global-shortcut:allow-register-all", @@ -79,7 +78,6 @@ "clipboard-manager:allow-read-text", "clipboard-manager:allow-write-text", "shell:default", - "dialog:default", - "notification:default" + "dialog:default" ] } diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 2e5d179f..22806248 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -110,7 +110,6 @@ pub fn run() { .plugin(tauri_plugin_clipboard_manager::init()) .plugin(tauri_plugin_process::init()) .plugin(tauri_plugin_global_shortcut::Builder::new().build()) - .plugin(tauri_plugin_notification::init()) .plugin(tauri_plugin_fs::init()) .plugin(tauri_plugin_dialog::init()) .plugin(tauri_plugin_shell::init()) diff --git a/src-tauri/src/utils/resolve.rs b/src-tauri/src/utils/resolve.rs index 87a6b7a9..9c7d9fbe 100644 --- a/src-tauri/src/utils/resolve.rs +++ b/src-tauri/src/utils/resolve.rs @@ -18,7 +18,6 @@ use tauri::{App, Manager}; use tauri::Url; //#[cfg(not(target_os = "linux"))] // use window_shadows::set_shadow; -use tauri_plugin_notification::NotificationExt; pub static VERSION: OnceCell = OnceCell::new(); @@ -239,8 +238,6 @@ pub fn create_window() { pub async fn resolve_scheme(param: String) -> Result<()> { log::info!(target:"app", "received deep link: {}", param); - let app_handle = handle::Handle::global().app_handle().unwrap(); - let param_str = if param.starts_with("[") && param.len() > 4 { param .get(2..param.len() - 2) @@ -280,24 +277,9 @@ pub async fn resolve_scheme(param: String) -> Result<()> { let uid = item.uid.clone().unwrap(); let _ = wrap_err!(Config::profiles().data().append_item(item)); handle::Handle::notice_message("import_sub_url::ok", uid); - - app_handle - .notification() - .builder() - .title("Clash Verge") - .body("Import profile success") - .show() - .unwrap(); } Err(e) => { handle::Handle::notice_message("import_sub_url::error", e.to_string()); - app_handle - .notification() - .builder() - .title("Clash Verge") - .body(format!("Import profile failed: {e}")) - .show() - .unwrap(); } } }