diff --git a/crates/tui/src/component/root_component.rs b/crates/tui/src/component/root_component.rs index 70087a4..efbecd9 100644 --- a/crates/tui/src/component/root_component.rs +++ b/crates/tui/src/component/root_component.rs @@ -9,8 +9,8 @@ use std::{ use crossterm::event::{KeyCode, KeyEvent, KeyModifiers}; use ratatui::{ - layout::{Constraint, Direction, Layout, Margin, Rect}, - widgets::Clear, + layout::{Constraint, Direction, Flex, Layout, Margin, Rect}, + widgets::{Block, Clear, Paragraph}, Frame, }; use tokio::sync::{mpsc::UnboundedSender, watch::Receiver}; @@ -342,6 +342,14 @@ impl Component for RootComponent { } fn draw(&mut self, f: &mut Frame<'_>, rect: Rect, _: &State) -> Result<(), TuiError> { + if rect.width < 20 && rect.height < 4 { + let [area] = Layout::horizontal([Constraint::Length(5)]) + .flex(Flex::Center) + .areas(rect); + let [area] = Layout::vertical([Constraint::Length(1)]).flex(Flex::Center).areas(area); + f.render_widget(Paragraph::new("For J"), area); + return Ok(()); + } let mut a = self.buffer_rx.clone(); let BufferAction::Count(count) = *a.borrow_and_update(); self.progress_bar.set_progress(count.1); diff --git a/docs/query-language/README.md b/docs/query-language/README.md index 66bd002..68a1570 100644 --- a/docs/query-language/README.md +++ b/docs/query-language/README.md @@ -36,7 +36,7 @@ value contains "release" ``` -5. Records where the `md5(key)` is equals to the user-provided parameter. A [search filter](./search-filter/README.md) must be implemented for this example. +5. Records where the `md5(key)` is equals to the user-provided parameter. A [search filter](../search-filter/README.md) must be implemented for this example. ```sql from begin md5-key-equals-to("d131dd02c5e6eec4693d9a0698aff95c2fcab58712467eab4004583eb8fb7f89") ``` \ No newline at end of file