admin_panel for admins have now some adjustements

This commit is contained in:
filipriec
2025-04-22 18:03:22 +02:00
parent 2c03ee6af0
commit 097264040f
3 changed files with 130 additions and 44 deletions

View File

@@ -82,8 +82,8 @@ 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 depends on focus AND navigation state
.highlight_style(if profile_focus { // Use focus state
// Highlight style depends only on Profiles focus
.highlight_style(if profile_focus {
Style::default().add_modifier(ratatui::style::Modifier::REVERSED)
} else {
Style::default()
@@ -93,8 +93,8 @@ pub fn render_admin_panel_admin(
f.render_stateful_widget(profile_list, profiles_inner_area, &mut admin_state.profile_list_state);
// --- Tables Pane (Middle) ---
let table_focus = admin_state.current_focus == AdminFocus::Tables;
let table_border_style = if table_focus {
let table_pane_has_focus = matches!(admin_state.current_focus, AdminFocus::Tables | AdminFocus::InsideTablesList);
let table_border_style = if table_pane_has_focus {
Style::default().fg(theme.highlight)
} else {
Style::default().fg(theme.border)
@@ -157,13 +157,13 @@ 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 depends on focus AND navigation state
.highlight_style(if table_focus { // Use focus state
// Highlight style depends on whether the pane OR inside has focus
.highlight_style(if table_pane_has_focus {
Style::default().add_modifier(ratatui::style::Modifier::REVERSED)
} else {
Style::default()
})
.highlight_symbol(if table_focus { "> " } else { " " }); // Focus indicator
.highlight_symbol("> ");
f.render_stateful_widget(table_list, tables_inner_area, &mut admin_state.table_list_state);