File transfer activity refactoring OK

This commit is contained in:
veeso
2021-03-21 13:18:53 +01:00
parent fd4c4a3772
commit 977becd5c9
3 changed files with 35 additions and 23 deletions

View File

@@ -470,7 +470,8 @@ impl FileTransferActivity {
}
self.umount_saveas();
// Reload files
match self.tab { // NOTE: Swapped is intentional
match self.tab {
// NOTE: Swapped is intentional
FileExplorerTab::Local => self.update_remote_filelist(),
FileExplorerTab::Remote => self.update_local_filelist(),
}
@@ -693,7 +694,7 @@ impl FileTransferActivity {
// Make log entries
let mut table: TableBuilder = TableBuilder::default();
for (idx, record) in self.log_records.iter().enumerate() {
let record_rows = textwrap::wrap(record.msg.as_str(), (width as usize) - 35); // -35 'cause log prefix
let record_rows = textwrap::wrap(record.msg.as_str(), (width as usize) - 38); // -35 'cause log prefix -3 cause of log line cursor
// Add row if not first row
if idx > 0 {
table.add_row();

View File

@@ -86,6 +86,7 @@ impl FileTransferActivity {
Box::new(LogBox::new(
PropsBuilder::default()
.with_foreground(Color::LightGreen)
.bold()
.build(),
)),
);