1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-02-28 15:22:14 +00:00

chore(eckhart): temporarily implement show progress UI trait function

This commit is contained in:
Lukas Bielesch 2025-02-26 12:16:55 +01:00
parent 2ef230c1a9
commit de25d208cd

View File

@ -565,12 +565,27 @@ impl FirmwareUI for UIEckhart {
Ok(layout) Ok(layout)
} }
// TODO: This is a temporary implementation so the UI can be functional.
// TODO: This is a temporary implementation so the UI can be functional.
fn show_progress( fn show_progress(
_description: TString<'static>, description: TString<'static>,
_indeterminate: bool, _indeterminate: bool,
_title: Option<TString<'static>>, title: Option<TString<'static>>,
) -> Result<impl LayoutMaybeTrace, Error> { ) -> Result<impl LayoutMaybeTrace, Error> {
Err::<RootComponent<Empty, ModelUI>, Error>(Error::ValueError(c"not implemented")) let (title, description) = if let Some(title) = title {
(title, description)
} else {
(description, "".into())
};
let paragraphs = Paragraph::new(&theme::TEXT_REGULAR, description)
.into_paragraphs()
.with_placement(LinearPlacement::vertical());
let header = Header::new(title);
let screen = TextScreen::new(paragraphs).with_header(header);
let layout = RootComponent::new(screen);
Ok(layout)
} }
fn show_progress_coinjoin( fn show_progress_coinjoin(