From 0446c41fc6fa2a896e58fcb4016452291a4091c7 Mon Sep 17 00:00:00 2001 From: Lukas Bielesch Date: Tue, 25 Feb 2025 17:15:44 +0100 Subject: [PATCH] feat(eckahrt): implement show info UI trait function --- .../rust/src/ui/layout_eckhart/ui_firmware.rs | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/core/embed/rust/src/ui/layout_eckhart/ui_firmware.rs b/core/embed/rust/src/ui/layout_eckhart/ui_firmware.rs index dbe3c0ff5f..842fd4196e 100644 --- a/core/embed/rust/src/ui/layout_eckhart/ui_firmware.rs +++ b/core/embed/rust/src/ui/layout_eckhart/ui_firmware.rs @@ -8,7 +8,7 @@ use crate::{ component::{ text::{ op::OpTextLayout, - paragraphs::{Paragraph, ParagraphSource, ParagraphVecShort, VecExt}, + paragraphs::{Paragraph, ParagraphSource, ParagraphVecShort, Paragraphs, VecExt}, }, Empty, FormattedText, }, @@ -504,12 +504,21 @@ impl FirmwareUI for UIEckhart { } fn show_info( - _title: TString<'static>, - _description: TString<'static>, + title: TString<'static>, + description: TString<'static>, _button: TString<'static>, _time_ms: u32, ) -> Result, Error> { - Err::, Error>(Error::ValueError(c"not implemented")) + let content = Paragraphs::new(Paragraph::new(&theme::TEXT_REGULAR, description)) + .with_placement(LinearPlacement::vertical()); + + let screen = TextScreen::new(content) + .with_header(Header::new(title)) + .with_action_bar(ActionBar::new_single(Button::with_text( + TR::buttons__continue.into(), + ))); + let obj = LayoutObj::new(screen)?; + Ok(obj) } fn show_info_with_cancel(