mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-02-28 15:22:14 +00:00
feat(eckahrt): implement show info UI trait function
This commit is contained in:
parent
d04174199c
commit
0446c41fc6
@ -8,7 +8,7 @@ use crate::{
|
|||||||
component::{
|
component::{
|
||||||
text::{
|
text::{
|
||||||
op::OpTextLayout,
|
op::OpTextLayout,
|
||||||
paragraphs::{Paragraph, ParagraphSource, ParagraphVecShort, VecExt},
|
paragraphs::{Paragraph, ParagraphSource, ParagraphVecShort, Paragraphs, VecExt},
|
||||||
},
|
},
|
||||||
Empty, FormattedText,
|
Empty, FormattedText,
|
||||||
},
|
},
|
||||||
@ -504,12 +504,21 @@ impl FirmwareUI for UIEckhart {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn show_info(
|
fn show_info(
|
||||||
_title: TString<'static>,
|
title: TString<'static>,
|
||||||
_description: TString<'static>,
|
description: TString<'static>,
|
||||||
_button: TString<'static>,
|
_button: TString<'static>,
|
||||||
_time_ms: u32,
|
_time_ms: u32,
|
||||||
) -> Result<Gc<LayoutObj>, Error> {
|
) -> Result<Gc<LayoutObj>, Error> {
|
||||||
Err::<Gc<LayoutObj>, 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(
|
fn show_info_with_cancel(
|
||||||
|
Loading…
Reference in New Issue
Block a user