mirror of
https://github.com/clash-verge-rev/clash-verge-rev
synced 2025-05-04 20:37:32 +08:00
fix: tray icon and tray rate display expression logic bug
This commit is contained in:
parent
42db9ea0bb
commit
6e40dd9862
@ -20,7 +20,7 @@
|
||||
"release-version": "node scripts/release_version.mjs",
|
||||
"release-alpha-version": "node scripts/release-alpha_version.mjs",
|
||||
"prepare": "husky",
|
||||
"clean": "cd ./src-tauri && cargo clean && cd -"
|
||||
"clippy": "cargo clippy --manifest-path ./src-tauri/Cargo.toml"
|
||||
},
|
||||
"dependencies": {
|
||||
"@dnd-kit/core": "^6.3.1",
|
||||
@ -110,4 +110,4 @@
|
||||
},
|
||||
"type": "module",
|
||||
"packageManager": "pnpm@9.13.2"
|
||||
}
|
||||
}
|
||||
|
@ -623,12 +623,12 @@ async fn check_netflix_cdn(client: &Client) -> UnlockItem {
|
||||
}
|
||||
|
||||
// 如果无法解析区域信息
|
||||
return UnlockItem {
|
||||
UnlockItem {
|
||||
name: "Netflix".to_string(),
|
||||
status: "Unknown".to_string(),
|
||||
region: None,
|
||||
check_time: Some(get_local_date_string()),
|
||||
};
|
||||
}
|
||||
}
|
||||
Err(e) => {
|
||||
eprintln!("解析Fast.com API响应失败: {}", e);
|
||||
|
@ -1,6 +1,6 @@
|
||||
use super::CmdResult;
|
||||
use crate::{
|
||||
core::{self, handle, CoreManager, RunningMode},
|
||||
core::{handle, CoreManager},
|
||||
module::sysinfo::PlatformSpecification,
|
||||
};
|
||||
use once_cell::sync::Lazy;
|
||||
|
@ -387,13 +387,13 @@ impl CoreManager {
|
||||
Ok(_) => {
|
||||
Config::runtime().apply();
|
||||
logging!(info, Type::Core, true, "Configuration updated successfully");
|
||||
return Ok(());
|
||||
Ok(())
|
||||
}
|
||||
Err(e) => {
|
||||
let msg = e.to_string();
|
||||
Config::runtime().discard();
|
||||
logging_error!(Type::Core, true, "Failed to update configuration: {}", msg);
|
||||
return Err(msg);
|
||||
Err(msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -419,7 +419,7 @@ impl CoreManager {
|
||||
"-d",
|
||||
dirs::path_to_str(&config_dir)?,
|
||||
"-f",
|
||||
dirs::path_to_str(&config_file)?,
|
||||
dirs::path_to_str(config_file)?,
|
||||
])
|
||||
.spawn()?;
|
||||
let pid = child.pid();
|
||||
|
@ -256,7 +256,7 @@ impl Tray {
|
||||
*icon_bytes_guard = Some(icon_bytes.clone());
|
||||
}
|
||||
|
||||
if !enable_tray_speed || (!enable_tray_speed && !enable_tray_icon) {
|
||||
if !enable_tray_speed {
|
||||
let _ = tray.set_icon(Some(tauri::image::Image::from_bytes(
|
||||
&(*icon_bytes_guard).clone().unwrap(),
|
||||
)?));
|
||||
|
@ -85,7 +85,6 @@ fn setup_light_weight_timer() -> Result<()> {
|
||||
let once_by_minutes = Config::verge()
|
||||
.latest()
|
||||
.auto_light_weight_minutes
|
||||
.clone()
|
||||
.unwrap_or(10);
|
||||
|
||||
let task = TaskBuilder::default()
|
||||
|
Loading…
x
Reference in New Issue
Block a user