mirror of
https://github.com/clash-verge-rev/clash-verge-rev
synced 2025-05-05 20:53:45 +08:00
chore: fix style
This commit is contained in:
parent
64a9079ce4
commit
92e712a508
@ -157,11 +157,20 @@ impl Tray {
|
||||
let _ = tray.get_item("system_proxy").set_selected(*system_proxy);
|
||||
let _ = tray.get_item("tun_mode").set_selected(*tun_mode);
|
||||
|
||||
let switch_map = {
|
||||
let mut map = std::collections::HashMap::new();
|
||||
map.insert(true, "on");
|
||||
map.insert(false, "off");
|
||||
map
|
||||
};
|
||||
|
||||
#[cfg(not(target_os = "linux"))]
|
||||
let _ = tray.set_tooltip(&format!(
|
||||
"Clash Verge {version}\n{}: {system_proxy}\n{}: {tun_mode}",
|
||||
"Clash Verge {version}\n{}: {}\n{}: {}",
|
||||
t!("System Proxy", "系统代理"),
|
||||
t!("TUN Mode", "Tun 模式")
|
||||
switch_map[system_proxy],
|
||||
t!("TUN Mode", "Tun 模式"),
|
||||
switch_map[tun_mode]
|
||||
));
|
||||
|
||||
Ok(())
|
||||
|
Loading…
x
Reference in New Issue
Block a user