From e965fc9e386d59cea93b5212dd02503dc1dfa03b Mon Sep 17 00:00:00 2001 From: Valdemar Lorenzen Date: Tue, 20 Oct 2026 11:49:12 +0200 Subject: [PATCH] fix: hide unavailable database type --- TODO.md | 2 +- src/connection.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/TODO.md b/TODO.md index 122aad4..8e22fd0 100644 --- a/TODO.md +++ b/TODO.md @@ -1,4 +1,4 @@ - [x] feature: ability to give the connection configs a custom name (control how they're displayed in the sidebar) - [x] feature: ability to remove a database connection - [x] feature: line numbers in gutter of sql editor -- [ ] bug: database type should display nothing instead of `-` when no database is connected. (it should only show the type when it's available) \ No newline at end of file +- [x] bug: database type should display nothing instead of `-` when no database is connected. (it should only show the type when it's available) \ No newline at end of file diff --git a/src/connection.rs b/src/connection.rs index d7a0698..baf2e0b 100644 --- a/src/connection.rs +++ b/src/connection.rs @@ -55,7 +55,7 @@ pub fn run(terminal: &mut DefaultTerminal, initial: Option) -> Result< && browser.as_ref().is_some_and(App::query_insert_mode) }; let name = connection_label.as_deref().unwrap_or_else(|| browser.as_ref().map_or("Not connected", App::database_name)); - draw_bars(frame, top, bottom, browser.as_ref().map_or("—", App::provider), name, insert, position); + draw_bars(frame, top, bottom, browser.as_ref().map_or("", App::provider), name, insert, position); let [sidebar, content] = Layout::horizontal([Constraint::Length(32), Constraint::Min(1)]) .areas(workspace); let items = entries.iter().map(|entry| {