warnings fixed

This commit is contained in:
filipriec
2025-04-18 16:17:02 +02:00
parent 6010b9a0af
commit 2a1fafc3f9
11 changed files with 6 additions and 115 deletions

View File

@@ -249,7 +249,6 @@ pub fn render_add_table(
.iter()
.map(|h| Cell::from(*h).style(Style::default().fg(theme.accent)));
let header = Row::new(header_cells).height(1).bottom_margin(1);
let columns_highlight_symbol = if add_table_state.current_focus == AddTableFocus::InsideColumnsTable { " > " } else { " " };
let columns_table = Table::new(
column_rows,
[ // Define constraints for 3 columns: Sel, Name, Type
@@ -353,7 +352,6 @@ pub fn render_add_table(
.iter()
.map(|h| Cell::from(*h).style(Style::default().fg(theme.accent)));
let index_header = Row::new(index_header_cells).height(1).bottom_margin(1);
let indexes_highlight_symbol = if add_table_state.current_focus == AddTableFocus::InsideIndexesTable { " > " } else { " " };
let indexes_table =
Table::new(index_rows, [Constraint::Percentage(100)])
.header(index_header)
@@ -399,7 +397,6 @@ pub fn render_add_table(
.iter()
.map(|h| Cell::from(*h).style(Style::default().fg(theme.accent)));
let link_header = Row::new(link_header_cells).height(1).bottom_margin(1);
let links_highlight_symbol = if add_table_state.current_focus == AddTableFocus::InsideLinksTable { " > " } else { " " };
let links_table =
Table::new(link_rows, [Constraint::Percentage(80), Constraint::Min(5)])
.header(link_header)

View File

@@ -66,8 +66,7 @@ pub fn render_admin_panel_admin(
.enumerate()
.map(|(idx, profile)| {
// Check persistent selection for prefix, navigation state for style/highlight
let is_selected = admin_state.selected_profile_index == Some(idx); // Use persistent state for [*]
let is_navigated = admin_state.profile_list_state.selected() == Some(idx); // Use nav state for highlight/>
let is_selected = admin_state.selected_profile_index == Some(idx);
let prefix = if is_selected { "[*] " } else { "[ ] " };
let style = if is_selected { // Style based on selection too
Style::default().fg(theme.highlight).add_modifier(ratatui::style::Modifier::BOLD)

View File

@@ -152,7 +152,7 @@ pub fn render_register(
let selected = state.get_selected_suggestion_index();
if !suggestions.is_empty() {
if let Some(input_rect) = active_field_rect {
autocomplete::render_autocomplete_dropdown(f, input_rect, f.size(), theme, suggestions, selected);
autocomplete::render_autocomplete_dropdown(f, input_rect, f.area(), theme, suggestions, selected);
}
}
}

View File

@@ -4,7 +4,7 @@ use crate::config::colors::themes::Theme;
use crate::state::app::buffer::BufferState;
use ratatui::{
layout::{Alignment, Rect},
style::{Style, Stylize},
style::Style,
text::{Line, Span},
widgets::Paragraph,
Frame,