intro buttons fixed

This commit is contained in:
Priec
2025-09-04 17:46:32 +02:00
parent d9d8562539
commit c51af13fb1
2 changed files with 2 additions and 2 deletions

View File

@@ -66,7 +66,7 @@ pub async fn handle_navigation_event(
} }
"select" => { "select" => {
let (context, index) = match &router.current { let (context, index) = match &router.current {
Page::Intro(state) => (UiContext::Intro, state.selected_option), Page::Intro(state) => (UiContext::Intro, state.focused_button_index),
Page::Login(state) if state.focus_outside_canvas => { Page::Login(state) if state.focus_outside_canvas => {
(UiContext::Login, state.focused_button_index) (UiContext::Login, state.focused_button_index)
} }

View File

@@ -56,7 +56,7 @@ pub fn render_intro(f: &mut Frame, intro_state: &IntroState, area: Rect, theme:
let buttons = ["Continue", "Admin", "Login", "Register"]; let buttons = ["Continue", "Admin", "Login", "Register"];
for (i, &text) in buttons.iter().enumerate() { for (i, &text) in buttons.iter().enumerate() {
let active = intro_state.focus_outside_canvas && intro_state.focused_button_index == i; let active = intro_state.focused_button_index == i;
render_button(f, button_area[i], text, active, theme); render_button(f, button_area[i], text, active, theme);
} }
} }