1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-04-20 00:59:02 +00:00

feat(eckhart): show_group_share_success

This commit is contained in:
Lukas Bielesch 2025-03-13 14:21:02 +01:00 committed by obrusvit
parent 13276e1948
commit 67e1417501
2 changed files with 21 additions and 6 deletions

View File

@ -620,9 +620,24 @@ impl FirmwareUI for UIEckhart {
}
fn show_group_share_success(
_lines: [TString<'static>; MAX_GROUP_SHARE_LINES],
lines: [TString<'static>; MAX_GROUP_SHARE_LINES],
) -> Result<impl LayoutMaybeTrace, Error> {
Err::<RootComponent<Empty, ModelUI>, Error>(Error::ValueError(c"not implemented"))
let paragraphs = Paragraph::new(&theme::TEXT_REGULAR, lines[0])
.into_paragraphs()
.with_placement(LinearPlacement::vertical());
let layout = RootComponent::new(
TextScreen::new(paragraphs)
.with_header(
Header::new(TR::words__title_done.into())
.with_icon(theme::ICON_DONE, theme::GREEN_LIGHT)
.with_text_style(theme::label_title_confirm()),
)
.with_action_bar(ActionBar::new_single(Button::with_text(
TR::buttons__continue.into(),
))),
);
Ok(layout)
}
fn show_homescreen(

View File

@ -87,10 +87,10 @@ async def show_group_share_success(share_index: int, group_index: int) -> None:
await raise_if_not_confirmed(
trezorui_api.show_group_share_success(
lines=[
TR.recovery__you_have_entered,
TR.recovery__share_num_template.format(share_index + 1),
TR.words__from,
TR.recovery__group_num_template.format(group_index + 1),
f"{TR.recovery__you_have_entered} {TR.recovery__share_num_template.format(share_index + 1)} {TR.words__from} {TR.recovery__group_num_template.format(group_index + 1)}.",
"",
"",
"",
],
),
"share_success",