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:
@@ -4,6 +4,7 @@ mod input;
|
||||
mod render;
|
||||
mod rooms;
|
||||
mod search;
|
||||
mod settings;
|
||||
|
||||
use crate::models::AppState;
|
||||
use crate::persist::{
|
||||
@@ -177,6 +178,9 @@ impl MainTui {
|
||||
// Poll for chat-room events
|
||||
self.poll_room_events();
|
||||
|
||||
// Refresh the uploads we are serving to peers
|
||||
self.state.uploads = self.client.uploads();
|
||||
|
||||
self.spinner_state = (self.spinner_state + 1) % 10;
|
||||
|
||||
self.save_persisted_state();
|
||||
|
||||
Reference in New Issue
Block a user