working read only mode in login and register properly workig now
This commit is contained in:
@@ -243,8 +243,17 @@ pub async fn run_ui() -> Result<(), Box<dyn std::error::Error>> {
|
||||
form_state.current_cursor_pos =
|
||||
event_handler.ideal_cursor_column.min(max_cursor_pos);
|
||||
}
|
||||
} else if app_state.ui.show_login || app_state.ui.show_register {
|
||||
// Handle cursor updates for AuthState if needed, similar to FormState
|
||||
} else if app_state.ui.show_register {
|
||||
if !event_handler.is_edit_mode {
|
||||
let current_input = register_state.get_current_input();
|
||||
let max_cursor_pos = if !current_input.is_empty() {
|
||||
current_input.len() - 1
|
||||
} else {
|
||||
0
|
||||
};
|
||||
register_state.current_cursor_pos = event_handler.ideal_cursor_column.min(max_cursor_pos);
|
||||
}
|
||||
} else if app_state.ui.show_login {
|
||||
if !event_handler.is_edit_mode {
|
||||
let current_input = auth_state.get_current_input();
|
||||
let max_cursor_pos = if !current_input.is_empty() {
|
||||
|
||||
Reference in New Issue
Block a user