mirror of
https://github.com/veeso/termscp.git
synced 2025-12-07 09:36:00 -08:00
Fixed error overlay for auth activity
This commit is contained in:
@@ -168,18 +168,18 @@ impl Activity for AuthActivity {
|
|||||||
if let Err(err) = enable_raw_mode() {
|
if let Err(err) = enable_raw_mode() {
|
||||||
error!("Failed to enter raw mode: {}", err);
|
error!("Failed to enter raw mode: {}", err);
|
||||||
}
|
}
|
||||||
|
// Initialize view
|
||||||
|
self.init();
|
||||||
// Init bookmarks client
|
// Init bookmarks client
|
||||||
if self.bookmarks_client.is_none() {
|
if self.bookmarks_client.is_none() {
|
||||||
self.init_bookmarks_client();
|
self.init_bookmarks_client();
|
||||||
}
|
}
|
||||||
|
// If check for updates is enabled, check for updates
|
||||||
|
self.check_for_updates();
|
||||||
// Verify error state from context
|
// Verify error state from context
|
||||||
if let Some(err) = self.context.as_mut().unwrap().get_error() {
|
if let Some(err) = self.context.as_mut().unwrap().get_error() {
|
||||||
self.mount_error(err.as_str());
|
self.mount_error(err.as_str());
|
||||||
}
|
}
|
||||||
// If check for updates is enabled, check for updates
|
|
||||||
self.check_for_updates();
|
|
||||||
// Initialize view
|
|
||||||
self.init();
|
|
||||||
info!("Activity initialized");
|
info!("Activity initialized");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -223,6 +223,13 @@ impl AuthActivity {
|
|||||||
self.umount_bookmark_del_dialog();
|
self.umount_bookmark_del_dialog();
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
// Error message
|
||||||
|
(COMPONENT_TEXT_ERROR, &MSG_KEY_ENTER) | (COMPONENT_TEXT_ERROR, &MSG_KEY_ESC) => {
|
||||||
|
// Umount text error
|
||||||
|
self.umount_error();
|
||||||
|
None
|
||||||
|
}
|
||||||
|
(COMPONENT_TEXT_ERROR, _) => None,
|
||||||
// Help
|
// Help
|
||||||
(_, &MSG_KEY_CTRL_H) => {
|
(_, &MSG_KEY_CTRL_H) => {
|
||||||
// Show help
|
// Show help
|
||||||
@@ -286,12 +293,6 @@ impl AuthActivity {
|
|||||||
self.umount_bookmark_save_dialog();
|
self.umount_bookmark_save_dialog();
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
// Error message
|
|
||||||
(COMPONENT_TEXT_ERROR, &MSG_KEY_ENTER) => {
|
|
||||||
// Umount text error
|
|
||||||
self.umount_error();
|
|
||||||
None
|
|
||||||
}
|
|
||||||
// Quit dialog
|
// Quit dialog
|
||||||
(COMPONENT_RADIO_QUIT, Msg::OnSubmit(Payload::One(Value::Usize(choice)))) => {
|
(COMPONENT_RADIO_QUIT, Msg::OnSubmit(Payload::One(Value::Usize(choice)))) => {
|
||||||
// If choice is 0, quit termscp
|
// If choice is 0, quit termscp
|
||||||
|
|||||||
Reference in New Issue
Block a user