1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-04-23 10:39:03 +00:00

fix(eckhart): minor fixes for recovery and reset screens

correct placement of numbers on the keypad,
fix number input screen for double-digit numbers,
remove unused menu button, use double action bar instead,
fix inconsistent hint use
update warning titles
This commit is contained in:
Lukas Bielesch 2025-03-18 18:23:10 +01:00 committed by obrusvit
parent fe7a26b541
commit dafd64f91d
6 changed files with 13 additions and 11 deletions

View File

@ -114,8 +114,8 @@ impl ValueKeypad {
const CANCEL_BUTTON_INDEX: usize = 2;
pub fn new_single_share() -> Self {
const NUMBERS: [u32; 5] = [12, 24, 18, 20, 33];
const LABELS: [&str; 5] = ["12", "24", "18", "20", "33"];
const NUMBERS: [u32; 5] = [12, 20, 18, 24, 33];
const LABELS: [&str; 5] = ["12", "20", "18", "24", "33"];
Self::new(&LABELS, &NUMBERS)
}

View File

@ -41,7 +41,7 @@ impl NumberInputScreen {
Self {
header: Header::new(TString::empty()),
action_bar: ActionBar::new_double(
Button::with_icon(theme::ICON_CHEVRON_UP),
Button::with_icon(theme::ICON_CROSS).styled(theme::button_cancel()),
Button::with_text(TR::buttons__continue.into()),
),
number_input: NumberInput::new(min, max, init_value),
@ -190,7 +190,7 @@ impl NumberInput {
}
fn render_number<'s>(&'s self, target: &mut impl Renderer<'s>) {
let mut buf = [0u8; 1];
let mut buf = [0u8; 3];
if let Some(text) = strutil::format_i64(self.value as i64, &mut buf) {
let font = fonts::FONT_SATOSHI_EXTRALIGHT_72;

View File

@ -58,7 +58,8 @@ impl<'a> ShareWordsScreen<'a> {
let header = Header::new(TR::reset__recovery_wallet_backup_title.into());
let hint = Hint::new_instruction(TR::reset__share_words_first, Some(theme::ICON_INFO));
let mut hint = Hint::new_page_counter();
hint.update(content.pager());
Self {
content,

View File

@ -99,7 +99,7 @@ pub fn new_prompt_backup() -> Result<SwipeFlow, error::Error> {
let content_skip_intro = TextScreen::new(paragraphs_skip_intro)
.with_header(
Header::new(TR::words__pay_attention.into())
Header::new(TR::words__important.into())
.with_icon(theme::ICON_WARNING, theme::ORANGE)
.with_text_style(theme::label_title_danger()),
)

View File

@ -473,7 +473,7 @@ impl FirmwareUI for UIEckhart {
) -> Result<impl LayoutMaybeTrace, Error> {
let description = description.unwrap_or(TString::empty());
let component = NumberInputScreen::new(min_count, max_count, count, description)
.with_header(Header::new(title).with_menu_button());
.with_header(Header::new(title));
let layout = RootComponent::new(component);
@ -573,9 +573,10 @@ impl FirmwareUI for UIEckhart {
let layout = RootComponent::new(
TextScreen::new(checklist_content)
.with_header(Header::new(title).with_menu_button())
.with_action_bar(ActionBar::new_single(
Button::with_text(button).styled(theme::button_default()),
.with_header(Header::new(title))
.with_action_bar(ActionBar::new_double(
Button::with_icon(theme::ICON_CROSS).styled(theme::button_cancel()),
Button::with_text(button),
)),
);

View File

@ -377,7 +377,7 @@ def show_share_confirmation_failure() -> Awaitable[None]:
return show_reset_warning(
"warning_backup_check",
TR.reset__incorrect_word_selected,
TR.words__pay_attention,
TR.words__important,
TR.words__try_again,
ButtonRequestType.ResetDevice,
)