feat(ui-dioxus): add signal-based PulsingDot animation (Blitz-friendly)

This commit is contained in:
Hibryda 2026-03-19 06:39:47 +01:00
parent 6f9607d1ba
commit b0547d5c05
4 changed files with 83 additions and 14 deletions

View file

@ -3,6 +3,7 @@
/// Mirrors the Svelte app's StatusBar.svelte (Mission Control bar).
use dioxus::prelude::*;
use crate::components::pulsing_dot::{PulsingDot, DotState};
#[derive(Clone, PartialEq)]
pub struct FleetState {
@ -22,20 +23,14 @@ pub fn StatusBar(fleet: FleetState) -> Element {
div { class: "status-bar-left",
// Running
div { class: "status-item",
div {
class: "status-dot running",
style: "width: 6px; height: 6px; border-radius: 50%; display: inline-block;",
}
PulsingDot { state: DotState::Running, size: "6px".to_string() }
span { class: "status-count running", "{fleet.running}" }
span { "running" }
}
// Idle
div { class: "status-item",
div {
class: "status-dot idle",
style: "width: 6px; height: 6px; border-radius: 50%; display: inline-block;",
}
PulsingDot { state: DotState::Idle, size: "6px".to_string() }
span { class: "status-count idle", "{fleet.idle}" }
span { "idle" }
}
@ -43,10 +38,7 @@ pub fn StatusBar(fleet: FleetState) -> Element {
// Stalled
if fleet.stalled > 0 {
div { class: "status-item",
div {
class: "status-dot stalled",
style: "width: 6px; height: 6px; border-radius: 50%; display: inline-block;",
}
PulsingDot { state: DotState::Stalled, size: "6px".to_string() }
span { class: "status-count stalled", "{fleet.stalled}" }
span { "stalled" }
}