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:
@@ -52,7 +52,7 @@ function currentProfileLabel(state: EnrollmentState | null) {
|
||||
|
||||
function formatDataSize(bytes: number) {
|
||||
if (!bytes) {
|
||||
return "0 MB";
|
||||
return "0 B";
|
||||
}
|
||||
|
||||
const units = ["B", "KB", "MB", "GB", "TB"];
|
||||
|
||||
Reference in New Issue
Block a user