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:
@@ -735,6 +735,7 @@ fn read_transfer_totals(profile: &Path) -> Result<(u64, u64), String> {
|
||||
#[cfg(target_os = "windows")]
|
||||
fn find_wg_cli() -> 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