Refactor UI components for layout management and results display
- Replaced the `renderizar` function in `layouts.rs` with a new `view` function using Iced for a more modern UI approach. - Introduced a new `view_secao_layouts` function to handle the display of saved layouts. - Updated the `resultado.rs` file to use Iced for rendering the results screen, including buttons for actions and pagination controls. - Created a new `selecionar_aba.rs` file for the selection of XLSX sheet tabs, implementing a preview feature. - Removed old rendering functions and replaced them with Iced components for better performance and maintainability. - Added design tokens in `design_tokens.json` for consistent styling across the application. - Created a mockup HTML file to visualize the UI design.
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
use crate::ui::message::Message;
|
||||
use iced::widget::{button, row, text};
|
||||
use iced::Element;
|
||||
|
||||
/// Renderiza controles de paginação reutilizáveis.
|
||||
pub fn controles_paginacao(
|
||||
pagina_atual: usize,
|
||||
total_paginas: usize,
|
||||
msg_anterior: Message,
|
||||
msg_proximo: Message,
|
||||
) -> Element<'static, Message> {
|
||||
let btn_anterior = button("◀").on_press_maybe((pagina_atual > 0).then_some(msg_anterior));
|
||||
let btn_proximo =
|
||||
button("▶").on_press_maybe((pagina_atual + 1 < total_paginas).then_some(msg_proximo));
|
||||
|
||||
row![
|
||||
btn_anterior,
|
||||
text(format!("Página {} / {}", pagina_atual + 1, total_paginas)).size(13),
|
||||
btn_proximo,
|
||||
]
|
||||
.spacing(8)
|
||||
.into()
|
||||
}
|
||||
Reference in New Issue
Block a user