diff --git a/client/src/components/admin/admin_panel_admin.rs b/client/src/components/admin/admin_panel_admin.rs index e351376..1385f21 100644 --- a/client/src/components/admin/admin_panel_admin.rs +++ b/client/src/components/admin/admin_panel_admin.rs @@ -57,9 +57,10 @@ pub fn render_admin_panel_admin( .iter() .enumerate() .map(|(i, profile)| { + // THIS line checks the selection state for the profile list let is_selected = admin_state.profile_list_state.selected() == Some(i); let prefix = if is_selected { "[*] " } else { "[ ] " }; // Use [*] for selected - let style = if is_selected { + let style = if is_selected { // Style based on selection too Style::default().fg(theme.highlight).add_modifier(ratatui::style::Modifier::BOLD) } else { Style::default().fg(theme.fg) @@ -73,8 +74,12 @@ pub fn render_admin_panel_admin( // Build and render profile list inside the block's inner area let profile_list = List::new(profile_list_items) - .highlight_style(Style::default().add_modifier(ratatui::style::Modifier::REVERSED)) - .highlight_symbol(if profile_focus { "> " } else { " " }); // Focus indicator + .highlight_style(if profile_focus { + Style::default().add_modifier(ratatui::style::Modifier::REVERSED) + } else { + Style::default() + }) + .highlight_symbol(if profile_focus { "> " } else { " " }); f.render_stateful_widget(profile_list, profiles_inner_area, &mut admin_state.profile_list_state); @@ -140,7 +145,11 @@ pub fn render_admin_panel_admin( // Build and render table list inside the block's inner area let table_list = List::new(table_list_items) - .highlight_style(Style::default().add_modifier(ratatui::style::Modifier::REVERSED)) + .highlight_style(if table_focus { + Style::default().add_modifier(ratatui::style::Modifier::REVERSED) + } else { + Style::default() + }) .highlight_symbol(if table_focus { "> " } else { " " }); // Focus indicator f.render_stateful_widget(table_list, tables_inner_area, &mut admin_state.table_list_state);