fix: place help below both panes and status in table border
This commit is contained in:
+6
-1
@@ -34,8 +34,10 @@ pub fn run(terminal: &mut DefaultTerminal, initial: Option<Database>) -> Result<
|
||||
expanded,
|
||||
);
|
||||
terminal.draw(|frame| {
|
||||
let [main, help] =
|
||||
Layout::vertical([Constraint::Min(1), Constraint::Length(2)]).areas(frame.area());
|
||||
let [sidebar, content] = Layout::horizontal([Constraint::Length(32), Constraint::Min(1)])
|
||||
.areas(frame.area());
|
||||
.areas(main);
|
||||
let items = entries.iter().map(|entry| {
|
||||
ListItem::new(match *entry {
|
||||
ExplorerEntry::Database(index) => {
|
||||
@@ -62,6 +64,9 @@ pub fn run(terminal: &mut DefaultTerminal, initial: Option<Database>) -> Result<
|
||||
if let Some(error) = &error {
|
||||
frame.render_widget(Paragraph::new(error.as_str()).style(Style::default().fg(Color::Red)), Rect::new(content.x, content.bottom().saturating_sub(1), content.width, 1));
|
||||
}
|
||||
frame.render_widget(Paragraph::new(
|
||||
" Tab focus · Esc explorer · ↑↓/jk move · Enter open · s schema/rows\n ←→/hl columns · n/p page · r refresh · c add database · q quit"
|
||||
).style(Style::default().fg(Color::DarkGray)), help);
|
||||
if show_form {
|
||||
form.draw(frame);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user