feat: update shared directories at runtime

Client::set_shared_directories rescans the given roots into a fresh
in-memory index, swaps it for peers, and re-announces the folder/file
counts to the server. The current directory list moves into the client
context so the running set is queryable. e2e-verified: a browser sees a
directory that was added after login.
This commit is contained in:
michel
2026-07-20 20:49:01 +02:00
parent a605431a10
commit be8197fd31
6 changed files with 115 additions and 11 deletions
+1 -1
View File
@@ -354,7 +354,7 @@ impl MainTui {
let shortcuts_line = format_shortcuts_styled(&shortcuts);
// Surface our own sharing status in the block title.
let shared = self.client.shared_directories();
let sharing = match shared {
let sharing = match shared.as_slice() {
[] => "off".to_string(),
[only] => only.clone(),
more => format!("{} folders", more.len()),