mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-02-24 05:12:02 +00:00
feat(eckhart): provisional homescreen
This commit is contained in:
parent
438ed65bd1
commit
bde3499cad
@ -4,7 +4,10 @@ use crate::{
|
|||||||
micropython::{gc::Gc, list::List, obj::Obj},
|
micropython::{gc::Gc, list::List, obj::Obj},
|
||||||
strutil::TString,
|
strutil::TString,
|
||||||
ui::{
|
ui::{
|
||||||
component::Empty,
|
component::{
|
||||||
|
text::paragraphs::{Paragraph, ParagraphSource, ParagraphVecShort},
|
||||||
|
Empty,
|
||||||
|
},
|
||||||
layout::{
|
layout::{
|
||||||
obj::{LayoutMaybeTrace, LayoutObj, RootComponent},
|
obj::{LayoutMaybeTrace, LayoutObj, RootComponent},
|
||||||
util::RecoveryType,
|
util::RecoveryType,
|
||||||
@ -366,12 +369,22 @@ impl FirmwareUI for UIEckhart {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn show_homescreen(
|
fn show_homescreen(
|
||||||
_label: TString<'static>,
|
label: TString<'static>,
|
||||||
_hold: bool,
|
_hold: bool,
|
||||||
_notification: Option<TString<'static>>,
|
notification: Option<TString<'static>>,
|
||||||
_notification_level: u8,
|
_notification_level: u8,
|
||||||
) -> Result<impl LayoutMaybeTrace, Error> {
|
) -> Result<impl LayoutMaybeTrace, Error> {
|
||||||
Err::<RootComponent<Empty, ModelUI>, 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(
|
fn show_info(
|
||||||
|
Loading…
Reference in New Issue
Block a user