From bde3499cada08ca4c2c7f9559f7102ecc0d28721 Mon Sep 17 00:00:00 2001 From: obrusvit Date: Mon, 23 Dec 2024 14:45:50 +0100 Subject: [PATCH] feat(eckhart): provisional homescreen --- .../rust/src/ui/layout_eckhart/ui_firmware.rs | 21 +++++++++++++++---- 1 file changed, 17 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 565d9b6432..c1c0c381bf 100644 --- a/core/embed/rust/src/ui/layout_eckhart/ui_firmware.rs +++ b/core/embed/rust/src/ui/layout_eckhart/ui_firmware.rs @@ -4,7 +4,10 @@ use crate::{ micropython::{gc::Gc, list::List, obj::Obj}, strutil::TString, ui::{ - component::Empty, + component::{ + text::paragraphs::{Paragraph, ParagraphSource, ParagraphVecShort}, + Empty, + }, layout::{ obj::{LayoutMaybeTrace, LayoutObj, RootComponent}, util::RecoveryType, @@ -366,12 +369,22 @@ impl FirmwareUI for UIEckhart { } fn show_homescreen( - _label: TString<'static>, + label: TString<'static>, _hold: bool, - _notification: Option>, + notification: Option>, _notification_level: u8, ) -> Result { - Err::, Error>(Error::ValueError(c"not implemented")) + let paragraphs = ParagraphVecShort::from_iter([ + Paragraph::new(&theme::TEXT_NORMAL, label), + Paragraph::new( + &theme::TEXT_NORMAL, + notification.unwrap_or(TString::empty()), + ), + ]) + .into_paragraphs(); + + let layout = RootComponent::new(paragraphs); + Ok(layout) } fn show_info(