mirror of
https://github.com/veeso/termscp.git
synced 2025-12-07 09:36:00 -08:00
Copy feature in ui; new keybinding <C>
This commit is contained in:
@@ -177,6 +177,20 @@ impl FileTransferActivity {
|
||||
}
|
||||
}
|
||||
KeyCode::Char(ch) => match ch {
|
||||
'c' | 'C' => {
|
||||
// Copy
|
||||
self.input_mode = InputMode::Popup(PopupType::Input(
|
||||
String::from("Insert destination name"),
|
||||
FileTransferActivity::callback_copy,
|
||||
));
|
||||
}
|
||||
'd' | 'D' => {
|
||||
// Make directory
|
||||
self.input_mode = InputMode::Popup(PopupType::Input(
|
||||
String::from("Insert directory name"),
|
||||
FileTransferActivity::callback_mkdir,
|
||||
));
|
||||
}
|
||||
'e' | 'E' => {
|
||||
// Get file at index
|
||||
if let Some(entry) = self.local.files.get(self.local.index) {
|
||||
@@ -201,13 +215,6 @@ impl FileTransferActivity {
|
||||
FileTransferActivity::callback_change_directory,
|
||||
));
|
||||
}
|
||||
'd' | 'D' => {
|
||||
// Make directory
|
||||
self.input_mode = InputMode::Popup(PopupType::Input(
|
||||
String::from("Insert directory name"),
|
||||
FileTransferActivity::callback_mkdir,
|
||||
));
|
||||
}
|
||||
'h' | 'H' => {
|
||||
// Show help
|
||||
self.input_mode = InputMode::Popup(PopupType::Help);
|
||||
@@ -389,6 +396,20 @@ impl FileTransferActivity {
|
||||
}
|
||||
}
|
||||
KeyCode::Char(ch) => match ch {
|
||||
'c' | 'C' => {
|
||||
// Copy
|
||||
self.input_mode = InputMode::Popup(PopupType::Input(
|
||||
String::from("Insert destination name"),
|
||||
FileTransferActivity::callback_copy,
|
||||
));
|
||||
}
|
||||
'd' | 'D' => {
|
||||
// Make directory
|
||||
self.input_mode = InputMode::Popup(PopupType::Input(
|
||||
String::from("Insert directory name"),
|
||||
FileTransferActivity::callback_mkdir,
|
||||
));
|
||||
}
|
||||
'e' | 'E' => {
|
||||
// Get file at index
|
||||
if let Some(entry) = self.remote.files.get(self.remote.index) {
|
||||
@@ -405,13 +426,6 @@ impl FileTransferActivity {
|
||||
))
|
||||
}
|
||||
}
|
||||
'd' | 'D' => {
|
||||
// Make directory
|
||||
self.input_mode = InputMode::Popup(PopupType::Input(
|
||||
String::from("Insert directory name"),
|
||||
FileTransferActivity::callback_mkdir,
|
||||
));
|
||||
}
|
||||
'g' | 'G' => {
|
||||
// Goto
|
||||
// Show input popup
|
||||
|
||||
Reference in New Issue
Block a user