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:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user