fix: update lightweight mode implementation and fix MacOS dock icon visibility

This commit is contained in:
Tunglies
2025-03-24 19:16:21 +08:00
parent e330d75a89
commit 09f6917638
6 changed files with 12 additions and 12 deletions

View File

@@ -1,4 +1,7 @@
use crate::{config::Config, core::handle, feat, log_err, utils::resolve};
use crate::{
config::Config, core::handle, feat, log_err, module::lightweight::entry_lightweight_mode,
utils::resolve,
};
use anyhow::{bail, Result};
use once_cell::sync::OnceCell;
use parking_lot::Mutex;
@@ -147,7 +150,7 @@ impl Hotkey {
"clash_mode_direct" => || feat::change_clash_mode("direct".into()),
"toggle_system_proxy" => || feat::toggle_system_proxy(),
"toggle_tun_mode" => || feat::toggle_tun_mode(None),
"entry_lightweight_mode" => || feat::lightweight_mode(),
"entry_lightweight_mode" => || entry_lightweight_mode(),
"quit" => || feat::quit(Some(0)),
#[cfg(target_os = "macos")]
"hide" => || feat::hide(),

View File

@@ -6,7 +6,7 @@ use crate::{
cmd,
config::Config,
feat,
module::mihomo::Rate,
module::{lightweight::entry_lightweight_mode, mihomo::Rate},
resolve,
utils::{dirs, i18n::t, resolve::VERSION},
};
@@ -663,7 +663,7 @@ fn on_menu_event(_: &AppHandle, event: MenuEvent) {
"open_logs_dir" => crate::log_err!(cmd::open_logs_dir()),
"restart_clash" => feat::restart_clash_core(),
"restart_app" => feat::restart_app(),
"entry_lightweight_mode" => feat::lightweight_mode(),
"entry_lightweight_mode" => entry_lightweight_mode(),
"quit" => {
println!("quit");
feat::quit(Some(0));