feat: settings popup and uploads in the transfers pane

Press 'o' for a settings popup: edit the download folder, add/remove
share paths (applied live via a rescan and persisted to config.toml),
and force a re-index with 'r' for files changed on disk. The state
machine is unit-tested; feedback shows the shared file/folder counts.

The downloads pane is now Downloads/Uploads: uploads being served are
listed after downloads with an up-arrow marker, live progress, and
status; 'x' cancels an in-progress upload. Client::shared_counts exposes
the index size for the status line.
This commit is contained in:
michel
2026-07-20 20:56:39 +02:00
parent 4936d4dd2a
commit 724796c1eb
10 changed files with 533 additions and 19 deletions
+8
View File
@@ -671,6 +671,14 @@ impl Client {
.unwrap_or_default()
}
/// `(folders, files)` currently shared with peers.
#[must_use]
pub fn shared_counts(&self) -> (u32, u32) {
self.context.read_safe().map_or((0, 0), |ctx| {
(ctx.shares.folder_count(), ctx.shares.file_count())
})
}
/// Snapshot of the uploads served this session (active and finished),
/// most recent last.
#[must_use]