mirror of
https://github.com/veeso/termscp.git
synced 2025-12-07 09:36:00 -08:00
Added new keybindings to help; log new file created
This commit is contained in:
@@ -398,6 +398,10 @@ impl FileTransferActivity {
|
|||||||
format!("Could not create file \"{}\": {}", file_path.display(), err),
|
format!("Could not create file \"{}\": {}", file_path.display(), err),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
self.log(
|
||||||
|
LogLevel::Info,
|
||||||
|
format!("Created file \"{}\"", file_path.display()).as_str(),
|
||||||
|
);
|
||||||
// Reload files
|
// Reload files
|
||||||
let path: PathBuf = self.local.wrkdir.clone();
|
let path: PathBuf = self.local.wrkdir.clone();
|
||||||
self.local_scan(path.as_path());
|
self.local_scan(path.as_path());
|
||||||
@@ -454,6 +458,11 @@ impl FileTransferActivity {
|
|||||||
format!("Could not finalize file: {}", err),
|
format!("Could not finalize file: {}", err),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
self.log(
|
||||||
|
LogLevel::Info,
|
||||||
|
format!("Created file \"{}\"", file_path.display())
|
||||||
|
.as_str(),
|
||||||
|
);
|
||||||
// Reload files
|
// Reload files
|
||||||
let path: PathBuf = self.remote.wrkdir.clone();
|
let path: PathBuf = self.remote.wrkdir.clone();
|
||||||
self.remote_scan(path.as_path());
|
self.remote_scan(path.as_path());
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ impl FileTransferActivity {
|
|||||||
PopupType::Alert(_, _) => (50, 10),
|
PopupType::Alert(_, _) => (50, 10),
|
||||||
PopupType::Fatal(_) => (50, 10),
|
PopupType::Fatal(_) => (50, 10),
|
||||||
PopupType::FileInfo => (50, 50),
|
PopupType::FileInfo => (50, 50),
|
||||||
PopupType::Help => (50, 70),
|
PopupType::Help => (50, 80),
|
||||||
PopupType::Input(_, _) => (40, 10),
|
PopupType::Input(_, _) => (40, 10),
|
||||||
PopupType::Progress(_) => (40, 10),
|
PopupType::Progress(_) => (40, 10),
|
||||||
PopupType::Wait(_) => (50, 10),
|
PopupType::Wait(_) => (50, 10),
|
||||||
@@ -485,8 +485,7 @@ impl FileTransferActivity {
|
|||||||
let abs_path: PathBuf = fsentry.get_abs_path();
|
let abs_path: PathBuf = fsentry.get_abs_path();
|
||||||
let name: String = fsentry.get_name();
|
let name: String = fsentry.get_name();
|
||||||
let ctime: String = fmt_time(fsentry.get_creation_time(), "%b %d %Y %H:%M:%S");
|
let ctime: String = fmt_time(fsentry.get_creation_time(), "%b %d %Y %H:%M:%S");
|
||||||
let atime: String =
|
let atime: String = fmt_time(fsentry.get_last_access_time(), "%b %d %Y %H:%M:%S");
|
||||||
fmt_time(fsentry.get_last_access_time(), "%b %d %Y %H:%M:%S");
|
|
||||||
let mtime: String = fmt_time(fsentry.get_creation_time(), "%b %d %Y %H:%M:%S");
|
let mtime: String = fmt_time(fsentry.get_creation_time(), "%b %d %Y %H:%M:%S");
|
||||||
let (bsize, size): (ByteSize, usize) =
|
let (bsize, size): (ByteSize, usize) =
|
||||||
(ByteSize(fsentry.get_size() as u64), fsentry.get_size());
|
(ByteSize(fsentry.get_size() as u64), fsentry.get_size());
|
||||||
@@ -786,6 +785,26 @@ impl FileTransferActivity {
|
|||||||
Span::raw(" "),
|
Span::raw(" "),
|
||||||
Span::raw("Reload directory content"),
|
Span::raw("Reload directory content"),
|
||||||
])),
|
])),
|
||||||
|
ListItem::new(Spans::from(vec![
|
||||||
|
Span::styled(
|
||||||
|
"<N>",
|
||||||
|
Style::default()
|
||||||
|
.fg(Color::Cyan)
|
||||||
|
.add_modifier(Modifier::BOLD),
|
||||||
|
),
|
||||||
|
Span::raw(" "),
|
||||||
|
Span::raw("New file"),
|
||||||
|
])),
|
||||||
|
ListItem::new(Spans::from(vec![
|
||||||
|
Span::styled(
|
||||||
|
"<O>",
|
||||||
|
Style::default()
|
||||||
|
.fg(Color::Cyan)
|
||||||
|
.add_modifier(Modifier::BOLD),
|
||||||
|
),
|
||||||
|
Span::raw(" "),
|
||||||
|
Span::raw("Open text file"),
|
||||||
|
])),
|
||||||
ListItem::new(Spans::from(vec![
|
ListItem::new(Spans::from(vec![
|
||||||
Span::styled(
|
Span::styled(
|
||||||
"<Q>",
|
"<Q>",
|
||||||
|
|||||||
Reference in New Issue
Block a user