If the terminal window has less than 24 lines, then an error message is displayed in the auth activity

This commit is contained in:
veeso
2021-06-16 22:00:28 +02:00
parent c1bc81c664
commit a00c0117a2
6 changed files with 71 additions and 3 deletions
+3 -1
View File
@@ -32,7 +32,7 @@ use super::{
COMPONENT_INPUT_PORT, COMPONENT_INPUT_USERNAME, COMPONENT_RADIO_BOOKMARK_DEL_BOOKMARK,
COMPONENT_RADIO_BOOKMARK_DEL_RECENT, COMPONENT_RADIO_BOOKMARK_SAVE_PWD,
COMPONENT_RADIO_PROTOCOL, COMPONENT_RADIO_QUIT, COMPONENT_RECENTS_LIST, COMPONENT_TEXT_ERROR,
COMPONENT_TEXT_HELP,
COMPONENT_TEXT_HELP, COMPONENT_TEXT_SIZE_ERR,
};
use crate::ui::keymap::*;
use tuirealm::components::InputPropsBuilder;
@@ -306,6 +306,8 @@ impl Update for AuthActivity {
self.umount_quit();
None
}
// -- text size error; block everything
(COMPONENT_TEXT_SIZE_ERR, _) => None,
// On submit on any unhandled (connect)
(_, Msg::OnSubmit(_)) | (_, &MSG_KEY_ENTER) => {
// Match <ENTER> key for all other components