login page using canvas library

This commit is contained in:
filipriec
2025-08-28 21:26:21 +02:00
parent 19a9bab8c2
commit f5f2f2cdef
2 changed files with 41 additions and 4 deletions

View File

@@ -279,6 +279,23 @@ impl EventHandler {
let key_code = key_event.code;
let modifiers = key_event.modifiers;
if let Page::Login(login_page) = &mut router.current {
match login_page.handle_key_event(key_event) {
KeyEventOutcome::Consumed(Some(msg)) => {
self.command_message = msg;
return Ok(EventOutcome::Ok("Login input updated".to_string()));
}
KeyEventOutcome::Consumed(None) => {
return Ok(EventOutcome::Ok("Login input updated".to_string()));
}
KeyEventOutcome::Pending => {
return Ok(EventOutcome::Ok("Waiting for next key...".to_string()));
}
KeyEventOutcome::NotMatched => {
// fall through to other handlers (buttons, etc.)
}
}
}
if toggle_sidebar(
&mut app_state.ui,
config,