mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-03 03:50:58 +00:00
WIP feat(lincoln): homescreen
- provisionary implementation for now
This commit is contained in:
parent
fe93b86b43
commit
e55de99436
@ -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,
|
||||
@ -16,7 +19,7 @@ use crate::{
|
||||
},
|
||||
};
|
||||
|
||||
use super::UILincoln;
|
||||
use super::{theme, UILincoln};
|
||||
|
||||
impl FirmwareUI for UILincoln {
|
||||
fn confirm_action(
|
||||
@ -380,12 +383,22 @@ impl FirmwareUI for UILincoln {
|
||||
}
|
||||
|
||||
fn show_homescreen(
|
||||
_label: TString<'static>,
|
||||
label: TString<'static>,
|
||||
_hold: bool,
|
||||
_notification: Option<TString<'static>>,
|
||||
notification: Option<TString<'static>>,
|
||||
_notification_level: u8,
|
||||
) -> 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(
|
||||
|
Loading…
Reference in New Issue
Block a user