1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-07-05 14:22:33 +00:00
This commit is contained in:
tychovrahe 2023-04-04 12:39:42 +02:00
parent 75db03ce74
commit 7f26761304
3 changed files with 74 additions and 69 deletions

View File

@ -24,6 +24,8 @@
#include <pb_encode.h> #include <pb_encode.h>
#include "messages.pb.h" #include "messages.pb.h"
#include TREZOR_BOARD
#ifdef USE_BLE #ifdef USE_BLE
#include "ble/comm.h" #include "ble/comm.h"
#endif #endif

View File

@ -40,7 +40,7 @@ use confirm::Confirm;
use intro::Intro; use intro::Intro;
use menu::Menu; use menu::Menu;
use crate::ui::model_tt::bootloader::theme::TEXT_NORMAL; use crate::ui::model_tt::bootloader::theme::TEXT_NORMAL;
use crate::ui::model_tt::component::PinKeyboard; use crate::ui::model_tt::component::{PinKeyboard, PinKeyboardMsg};
use crate::ui::model_tt::theme::button_cancel; use crate::ui::model_tt::theme::button_cancel;
use self::theme::{RESULT_FW_INSTALL, RESULT_INITIAL, RESULT_WIPE}; use self::theme::{RESULT_FW_INSTALL, RESULT_INITIAL, RESULT_WIPE};
@ -434,9 +434,12 @@ extern "C" fn screen_pairing_confirm(buffer: *const cty::uint8_t) -> u32 {
let mut pin = PinKeyboard::new("Enter passkey", "", None, true); let mut pin = PinKeyboard::new("Enter passkey", "", None, true);
let res = run(&mut pin, true); let res = run(&mut pin, true);
let pin = pin.pin().as_bytes(); if res == 2 {
let pin = pin.pin().as_bytes();
pin_slice.copy_from_slice(&pin[0..6]); if pin.len() == 6 {
pin_slice.copy_from_slice(&pin[0..6]);
}
}
res res
} }
@ -449,8 +452,8 @@ extern "C" fn screen_repair_confirm() -> u32 {
Alignment::Center, Alignment::Center,
TEXT_NORMAL, TEXT_NORMAL,
); );
let right = Button::with_text("DENY").styled(button_confirm()); let right = Button::with_text("ALLOW").styled(button_confirm());
let left = Button::with_text("ALLOW").styled(button_cancel()); let left = Button::with_text("DENY").styled(button_bld());
let title = Label::new("REPAIR", Alignment::Start, theme::TEXT_BOLD) let title = Label::new("REPAIR", Alignment::Start, theme::TEXT_BOLD)
.vertically_aligned(Alignment::Center); .vertically_aligned(Alignment::Center);