Connected Devices: restyle status

This commit is contained in:
Ultradesu
2026-07-24 14:43:15 +03:00
parent 888038931a
commit a516887830
+9 -5
View File
@@ -270,13 +270,17 @@ fn player_right_line(state: &AppState, width: u16) -> Line<'static> {
spans.push(Span::styled(format!(" {}%", player.volume), theme::dim())); spans.push(Span::styled(format!(" {}%", player.volume), theme::dim()));
} }
if width >= 70 { if width >= 70 {
let role_style = match state.device_playback.role {
crate::app::state::DevicePlaybackRole::Active => Style::new().fg(Color::Green),
crate::app::state::DevicePlaybackRole::Control => Style::new().fg(Color::Yellow),
};
spans.push(Span::raw(" ")); spans.push(Span::raw(" "));
spans.push(Span::styled( spans.push(Span::styled(
format!( state.device_playback.role.label().to_string(),
"{} · online {}", role_style,
state.device_playback.role.label(), ));
state.device_playback.online_devices.max(1) spans.push(Span::styled(
), format!(" · online {}", state.device_playback.online_devices.max(1)),
theme::dim(), theme::dim(),
)); ));
} }