From 522d9af0a739caf02179584440d73f02beb209ee Mon Sep 17 00:00:00 2001 From: Valdemar Lorenzen Date: Mon, 19 Oct 2026 16:03:56 +0200 Subject: [PATCH] feat: show connection info from sidebar relations --- TODO.md | 2 +- src/connection.rs | 3 ++- src/main.rs | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/TODO.md b/TODO.md index 8c50777..e243aff 100644 --- a/TODO.md +++ b/TODO.md @@ -18,6 +18,6 @@ - [x] move the table name in the results pane from the bottom-left border title to top-right border title instead - [x] remove the bottom navigation help panel and have a keybinding overview appear in a floating window when pressing `?` in normal mode - [x] remove the path from the database entry in the sidebar (can be viewed in the info panel) -- [ ] info panel should also pop up when pressing `i` on a child entry of that database entry in the sidebar (instead of only when the parent/database connection is hovered) +- [x] info panel should also pop up when pressing `i` on a child entry of that database entry in the sidebar (instead of only when the parent/database connection is hovered) - [ ] `line:col` indicator in the bottom-right status bar should never disappear but instead display "N/A" in that case. - [ ] database type indicator should be moved down just left of the "line:col" indicator like in the attached image \ No newline at end of file diff --git a/src/connection.rs b/src/connection.rs index c6ad1c3..6be5898 100644 --- a/src/connection.rs +++ b/src/connection.rs @@ -202,6 +202,7 @@ pub fn run(terminal: &mut DefaultTerminal, initial: Option) -> Result< .selected() .and_then(|index| match entries.get(index) { Some(ExplorerEntry::Database(Some(index))) => Some(*index), + Some(ExplorerEntry::Relation(_)) => active, _ => None, }); } @@ -328,7 +329,7 @@ fn draw_help(frame: &mut Frame, screen: Rect, offset: &mut u16) { Home/End, g/G First / last item\n\ Left/Right, h/l Collapse/expand explorer or select cells\n\ Enter Connect/expand database or open relation\n\ - i Database info on saved database entries\n\ + i Saved connection info on database or child\n\ s Toggle rows / column schema\n\ n/p, PgDn/PgUp Next / previous 100-row relation page\n\ r Refresh relations and active relation\n\n\ diff --git a/src/main.rs b/src/main.rs index 3e7093b..69f00e7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -39,6 +39,7 @@ Navigation: n/p, PgDn/Up Next / previous 100-row relation page c Add a configured database in a floating window i Show configured database info (Esc/Enter closes; passwords omitted) + Works on a saved database entry or any of its table/view children. r Refresh relations and the active relation Connected databases have a trailing * and show their tables/views beneath them. SQLite sidebar entries show only the filename; the info window shows the full path.