Ctrl+Q quit; <esc> just disconnect

This commit is contained in:
ChristianVisintin
2020-12-05 17:04:39 +01:00
parent 1f4998b1c1
commit 28a4bed8fa
4 changed files with 60 additions and 6 deletions

View File

@@ -38,13 +38,24 @@ impl FileTransferActivity {
self.log_index = 0;
}
/// ### create_quit_popup
///
/// Create quit popup input mode (since must be shared between different input handlers)
pub(super) fn create_disconnect_popup(&mut self) -> InputMode {
InputMode::Popup(PopupType::YesNo(
String::from("Are you sure you want to disconnect?"),
FileTransferActivity::disconnect,
FileTransferActivity::callback_nothing_to_do,
))
}
/// ### create_quit_popup
///
/// Create quit popup input mode (since must be shared between different input handlers)
pub(super) fn create_quit_popup(&mut self) -> InputMode {
InputMode::Popup(PopupType::YesNo(
String::from("Are you sure you want to quit?"),
FileTransferActivity::disconnect,
FileTransferActivity::disconnect_and_quit,
FileTransferActivity::callback_nothing_to_do,
))
}