minor ui stuff
This commit is contained in:
@@ -21,7 +21,7 @@ pub async fn handle_action(
|
|||||||
auth_state.current_field = 1;
|
auth_state.current_field = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update cursor position
|
// Update cursor position only when in a field
|
||||||
if !auth_state.return_selected {
|
if !auth_state.return_selected {
|
||||||
let current_input = auth_state.get_current_input();
|
let current_input = auth_state.get_current_input();
|
||||||
let max_cursor_pos = current_input.len();
|
let max_cursor_pos = current_input.len();
|
||||||
@@ -39,11 +39,12 @@ pub async fn handle_action(
|
|||||||
// Username -> Password
|
// Username -> Password
|
||||||
auth_state.current_field = 1;
|
auth_state.current_field = 1;
|
||||||
} else if auth_state.current_field == 1 {
|
} else if auth_state.current_field == 1 {
|
||||||
// Password -> Buttons (Login button)
|
// Password -> Login button
|
||||||
auth_state.return_selected = false;
|
auth_state.return_selected = false;
|
||||||
|
// No cursor update needed when on buttons
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update cursor position when in a field
|
// Update cursor position only when in a field
|
||||||
if !auth_state.return_selected {
|
if !auth_state.return_selected {
|
||||||
let current_input = auth_state.get_current_input();
|
let current_input = auth_state.get_current_input();
|
||||||
let max_cursor_pos = current_input.len();
|
let max_cursor_pos = current_input.len();
|
||||||
@@ -55,4 +56,3 @@ pub async fn handle_action(
|
|||||||
_ => Err("Unknown login action".into())
|
_ => Err("Unknown login action".into())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user