feat: implement CmdProxyState for managing proxy refresh state and add state management module

refactor: remove unnecessary macOS conditional compilation directive
This commit is contained in:
Tunglies
2025-06-05 13:43:02 +08:00
parent 7c738483b7
commit fee6a586d7
6 changed files with 49 additions and 47 deletions

View File

@@ -2,10 +2,10 @@ mod cmd;
mod config;
mod core;
mod enhance;
mod error;
mod feat;
mod module;
mod process;
mod state;
mod utils;
use crate::{
core::hotkey,
@@ -15,7 +15,6 @@ use crate::{
use config::Config;
use std::sync::{Mutex, Once};
use tauri::AppHandle;
#[cfg(target_os = "macos")]
use tauri::Manager;
use tauri_plugin_autostart::MacosLauncher;
use tauri_plugin_deep_link::DeepLinkExt;
@@ -205,6 +204,8 @@ pub fn run() {
logging!(error, Type::Setup, true, "初始化资源失败: {}", e);
}
app.manage(Mutex::new(state::proxy::CmdProxyState::default()));
logging!(info, Type::Setup, true, "初始化完成,继续执行");
Ok(())
})