refactor: invock mihomo api by use tauri-plugin-mihomo

This commit is contained in:
oomeow
2025-10-01 09:30:28 +08:00
Unverified
parent f905969ed8
commit 64545de4b6
65 changed files with 1982 additions and 1840 deletions

View File

@@ -38,17 +38,7 @@ impl PlatformSpecification {
let system_kernel_version = System::kernel_version().unwrap_or("Null".into());
let system_arch = System::cpu_arch();
let Some(handler) = handle::Handle::global().app_handle() else {
return Self {
system_name,
system_version,
system_kernel_version,
system_arch,
verge_version: "unknown".into(),
running_mode: "NotRunning".to_string(),
is_admin: false,
};
};
let handler = handle::Handle::app_handle();
let verge_version = handler.package_info().version.to_string();
// 使用默认值避免在同步上下文中执行异步操作