Add containing-folder download shortcut to search results

This commit is contained in:
dumbgoy
2026-10-27 09:55:24 -04:00
parent 25fa5884ed
commit 1f0b541bdb
6 changed files with 694 additions and 24 deletions
@@ -79,6 +79,7 @@ const HELP_RIGHT: &[(&str, &[(&str, &str)])] = &[
("Space", "select / deselect"),
("a / A", "select all / none"),
("Enter", "download the selection"),
("D", "download highlighted file's containing folder"),
("/", "filter, Enter keeps it, Esc clears"),
("b", "browse the owner"),
("c", "chat rooms"),
@@ -397,6 +398,7 @@ impl MainTui {
FocusedPane::Results => vec![
("Space", "select"),
("Enter", "download"),
("D", "download containing folder"),
("b", "browse owner"),
("c", "chat"),
("/", "filter"),
@@ -426,7 +428,12 @@ impl MainTui {
// Borders and padding, and the unread badge's column when it shows.
let badge = self.unread_badge().width() as u16;
let reserved = 4 + if badge > 0 { badge + 1 } else { 0 };
pack_shortcuts(&self.shortcuts(), width.saturating_sub(reserved))
let mut rows =
pack_shortcuts(&self.shortcuts(), width.saturating_sub(reserved));
if let Some(status) = &self.folder_download_status {
rows.push(Line::styled(status.clone(), info_style()));
}
rows
}
/// A prominent unread badge for the shortcuts bar. It rides in the