feat(tui): adopt an asynchronous Tokio runtime for the TUI frontend
Refactor TUI event handling and rendering to improve responsiveness and use a unified managed client worker.
This commit is contained in:
12 files changed
+508
-266
No files matched your search
@@ -106,7 +106,6 @@ pub(super) struct TuiState {
|
||||
details_open: bool,
|
||||
details_scroll: (u16, u16),
|
||||
pub(super) paused: bool,
|
||||
pub(super) quit_requested: bool,
|
||||
}
|
||||
|
||||
impl TuiState {
|
||||
@@ -143,7 +142,6 @@ impl TuiState {
|
||||
details_open: false,
|
||||
details_scroll: (0, 0),
|
||||
paused: false,
|
||||
quit_requested: false,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -939,10 +937,6 @@ pub(super) fn draw_dashboard(frame: &mut Frame<'_>, state: &TuiState) {
|
||||
frame.render_widget(status_line(state), rows[3]);
|
||||
}
|
||||
|
||||
pub(super) fn should_render(now: Instant, next_render: Instant, paused: bool, force: bool) -> bool {
|
||||
force || (!paused && now >= next_render)
|
||||
}
|
||||
|
||||
fn dashboard_layout(area: Rect, state: &TuiState) -> [Rect; 4] {
|
||||
let footer = 3 + u16::from(state.last_warning.is_some());
|
||||
let target_rows = state.targets.len().min(6) as u16;
|
||||
|
||||
Reference in new issue
Block a user