feat: add dynamic tray menu with connection status, transfer metrics, and toggle action
Add TrayState struct to track menu items for status, received/sent bytes, and connection toggle. Add format_data_size helper to convert bytes to human-readable units (B, KB, MB, GB, TB). Add current_metrics, update_tray_menu, refresh_tray_menu, and toggle_tray_connection functions to manage tray state. Update tray menu to include status, received, sent, and toggle items. Call refresh_tray_menu after enroll_device
This commit is contained in:
@@ -233,6 +233,7 @@ fn parse_human_wireguard_bytes(value: &str) -> u64 {
|
||||
#[cfg(target_os = "windows")]
|
||||
fn find_windows_wg() -> Result<PathBuf, String> {
|
||||
let candidates = [
|
||||
PathBuf::from("wg"),
|
||||
PathBuf::from(r"C:\Program Files\WireGuard\wg.exe"),
|
||||
PathBuf::from(r"C:\Program Files (x86)\WireGuard\wg.exe"),
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user