1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-08-03 04:18:17 +00:00
This commit is contained in:
tychovrahe 2023-04-03 23:40:36 +02:00
parent e5b6c26175
commit 75db03ce74
2 changed files with 23 additions and 10 deletions

View File

@ -329,7 +329,7 @@ static usb_result_t bootloader_comm_loop(const vendor_header *const vhdr,
hal_delay(1000);
usb_stop();
usb_deinit();
ui_screen_boot_empty(true, true);
ui_screen_boot_empty(true);
return CONTINUE;
}
break;

View File

@ -39,6 +39,9 @@ pub mod welcome;
use confirm::Confirm;
use intro::Intro;
use menu::Menu;
use crate::ui::model_tt::bootloader::theme::TEXT_NORMAL;
use crate::ui::model_tt::component::PinKeyboard;
use crate::ui::model_tt::theme::button_cancel;
use self::theme::{RESULT_FW_INSTALL, RESULT_INITIAL, RESULT_WIPE};
@ -440,16 +443,26 @@ extern "C" fn screen_pairing_confirm(buffer: *const cty::uint8_t) -> u32 {
#[no_mangle]
extern "C" fn screen_repair_confirm() -> u32 {
let left = Button::with_text("DENY").styled(button_install_cancel());
let right = Button::with_text("ALLOW").styled(button_install_confirm());
let mut messages = ParagraphVecShort::new();
let msg = Label::new(
"Allow repair?",
Alignment::Center,
TEXT_NORMAL,
);
let right = Button::with_text("DENY").styled(button_confirm());
let left = Button::with_text("ALLOW").styled(button_cancel());
let title = Label::new("REPAIR", Alignment::Start, theme::TEXT_BOLD)
.vertically_aligned(Alignment::Center);
messages.add(Paragraph::new(&TEXT_NORMAL_BLACK, "Allow repair?").centered());
let mut frame = Confirm::new(
BLD_BG,
left,
right,
ConfirmTitle::Text(title),
msg,
None,
None,
);
let message =
Paragraphs::new(messages).with_placement(LinearPlacement::vertical().align_at_center());
let mut pin = Confirm::new(BLACK, None, left, right, false, (None, message), None);
run(&mut pin, true)
run(&mut frame, true)
}