refactor(ui): all table search and filter functionality is now available directly through the ManagarrTable widget to make life easier moving forward

This commit is contained in:
2024-12-05 19:07:03 -07:00
parent 9d0948e124
commit 5abed23cf2
14 changed files with 609 additions and 346 deletions
+6 -1
View File
@@ -9,6 +9,7 @@ use ratatui::widgets::Tabs;
use ratatui::widgets::Wrap;
use ratatui::Frame;
use sonarr_ui::SonarrUi;
use utils::layout_block;
use crate::app::App;
use crate::models::{HorizontallyScrollableText, Route, TabState};
@@ -161,7 +162,11 @@ pub fn draw_popup_over_ui<T: DrawUi>(
}
fn draw_tabs(f: &mut Frame<'_>, area: Rect, title: &str, tab_state: &TabState) -> Rect {
f.render_widget(title_block(title), area);
if title.is_empty() {
f.render_widget(layout_block(), area);
} else {
f.render_widget(title_block(title), area);
}
let [header_area, content_area] = Layout::vertical([Constraint::Length(1), Constraint::Fill(0)])
.margin(1)