Testing ratatui

This commit is contained in:
Marco De Araujo 2025-12-24 07:11:40 -04:00
parent 28483fe165
commit 843d05bec9
9 changed files with 349 additions and 9 deletions

View file

@ -95,13 +95,4 @@ impl DashboardViewState {
pub fn get_selected_monitor(&self) -> Option<&MonitorViewState> {
self.monitors.get(self.selected_index)
}
pub fn move_selection(&mut self, direction: isize) {
if self.monitors.is_empty() {
return;
}
let new_index = (self.selected_index as isize + direction) as usize;
self.selected_index = new_index.clamp(0, self.monitors.len() - 1);
}
}