feat: 132 queuing transfers (#332)

the logic of selecting files has been extended!
From now on selecting file will put the files into a transfer queue, which is shown on the bottom panel.
When a file is selected the file is added to the queue with a destination path, which is the **current other explorer path at the moment of selection.
It is possible to navigate to the transfer queue by using `P` and pressing `ENTER` on a file will remove it from the transfer queue.Other commands will work as well on the transfer queue, like `COPY`, `MOVE`, `DELETE`, `RENAME`.

closes #132
This commit is contained in:
Christian Visintin
2025-03-23 14:36:13 +01:00
committed by GitHub
parent 368570592f
commit ec75ae1486
39 changed files with 955 additions and 330 deletions
@@ -18,13 +18,15 @@ impl FileTransferActivity {
}
SelectedFile::Many(entries) => {
// Try to copy each file to Input/{FILE_NAME}
let base_path: PathBuf = PathBuf::from(input);
// Iter files
for entry in entries.iter() {
let mut dest_path: PathBuf = base_path.clone();
for (entry, mut dest_path) in entries.into_iter() {
dest_path.push(entry.name());
self.local_rename_file(entry, dest_path.as_path());
self.local_rename_file(&entry, dest_path.as_path());
}
// clear selection
self.host_bridge_mut().clear_queue();
self.reload_host_bridge_filelist();
}
SelectedFile::None => {}
}
@@ -38,13 +40,16 @@ impl FileTransferActivity {
}
SelectedFile::Many(entries) => {
// Try to copy each file to Input/{FILE_NAME}
let base_path: PathBuf = PathBuf::from(input);
// Iter files
for entry in entries.iter() {
let mut dest_path: PathBuf = base_path.clone();
for (entry, mut dest_path) in entries.into_iter() {
dest_path.push(entry.name());
self.remote_rename_file(entry, dest_path.as_path());
self.remote_rename_file(&entry, dest_path.as_path());
}
// clear selection
self.remote_mut().clear_queue();
// reload remote
self.reload_remote_filelist();
}
SelectedFile::None => {}
}