Add directional status icons for service commands
Replace generic hourglass with specific arrows: - ↑ (up) for starting services - ↓ (down) for stopping services - ↻ (circular) for restarting services Provides immediate visual feedback for service operations.
This commit is contained in:
parent
b3c67f4b7f
commit
8978356c49
@ -135,13 +135,15 @@ impl ServicesWidget {
|
|||||||
match status {
|
match status {
|
||||||
CommandStatus::InProgress { command_type, target, .. } => {
|
CommandStatus::InProgress { command_type, target, .. } => {
|
||||||
if target == service_name {
|
if target == service_name {
|
||||||
let status_text = match command_type {
|
// Only show special icons for service commands
|
||||||
CommandType::ServiceRestart => "restarting",
|
if let Some((icon, status_text)) = match command_type {
|
||||||
CommandType::ServiceStart => "starting",
|
CommandType::ServiceRestart => Some(("↻", "restarting")),
|
||||||
CommandType::ServiceStop => "stopping",
|
CommandType::ServiceStart => Some(("↑", "starting")),
|
||||||
_ => &info.status,
|
CommandType::ServiceStop => Some(("↓", "stopping")),
|
||||||
};
|
_ => None, // Don't handle non-service commands here
|
||||||
return ("⏳".to_string(), status_text.to_string(), Theme::highlight());
|
} {
|
||||||
|
return (icon.to_string(), status_text.to_string(), Theme::highlight());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_ => {} // Success/Failed states will show normal status
|
_ => {} // Success/Failed states will show normal status
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user