feat(tui): hierarchical browse tree with file/folder downloads
Wire browsing a user's shared files into the TUI as a modal tree popup: - press 'b' on a highlighted search result to browse that result's owner, or 'b' elsewhere to type a username (new CommandBarMode::Browse); - a new models/browse.rs synthesizes the flat SharedDirectory list into a nested, collapsible tree (intermediate folders reconstructed from the backslash paths; file download paths kept byte-exact from the original names), with expand/collapse state and a flatten-to-rows renderer — fully unit-tested; - the popup polls take_browse_result each tick (with a timeout), navigates with arrows/hjkl, expands/collapses folders, and queues downloads: Enter on a file, 'd' on a file or an entire folder subtree (recursively) — all funneled into the existing Downloads pane; - shortcuts bar advertises browse keys and surfaces our own sharing status.
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
mod app_state;
|
||||
mod browse;
|
||||
mod file_display_data;
|
||||
|
||||
pub use app_state::{
|
||||
AppState, ChatMessage, CommandBarMode, DownloadEntry, FocusedPane,
|
||||
MessageDirection, SearchEntry, SearchStatus,
|
||||
};
|
||||
pub use browse::{BrowseState, BrowseStatus, files_under, find_node};
|
||||
pub use file_display_data::FileDisplayData;
|
||||
|
||||
Reference in New Issue
Block a user