login page using canvas for forms

This commit is contained in:
filipriec
2025-08-28 21:07:23 +02:00
parent 6e221ef8c1
commit 19a9bab8c2
8 changed files with 195 additions and 101 deletions

View File

@@ -87,11 +87,11 @@ pub async fn handle_navigation_event(
pub fn up(app_state: &mut AppState, router: &mut Router) {
match &mut router.current {
Page::Login(state) if app_state.ui.focus_outside_canvas => {
Page::Login(page) if app_state.ui.focus_outside_canvas => {
if app_state.focused_button_index == 0 {
app_state.ui.focus_outside_canvas = false;
let last_field_index = state.field_count().saturating_sub(1);
state.set_current_field(last_field_index);
let last_field_index = page.state.field_count().saturating_sub(1);
page.state.set_current_field(last_field_index);
} else {
app_state.focused_button_index =
app_state.focused_button_index.saturating_sub(1);