mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-07-03 21:32:33 +00:00
fixup! feat(core/rust): boot sequence in rust
This commit is contained in:
parent
ca03b71a5b
commit
2dd0b4fa2e
@ -27,7 +27,7 @@ disp_i8080_8bit_dw = [] # write pixels directly to peripheral
|
||||
disp_i8080_16bit_dw = [] # write pixels directly to peripheral
|
||||
debug = ["ui_debug"]
|
||||
sbu = []
|
||||
sd_card = ["sd_card_hotswap"]
|
||||
sd_card = []
|
||||
sd_card_hotswap = []
|
||||
rgb_led = []
|
||||
backlight = []
|
||||
|
@ -1,3 +1,5 @@
|
||||
#![allow(unused_imports)]
|
||||
|
||||
use super::ffi;
|
||||
|
||||
pub use super::ffi::{BTN_EVT_DOWN, BTN_EVT_UP, BTN_LEFT, BTN_RIGHT};
|
||||
|
@ -16,6 +16,8 @@ use crate::ui::{
|
||||
},
|
||||
};
|
||||
|
||||
#[cfg(all(feature = "sd_card", not(feature = "sd_card_hotswap")))]
|
||||
use crate::ui::model::component::CancelConfirmMsg;
|
||||
#[cfg(all(feature = "sd_card", not(feature = "sd_card_hotswap")))]
|
||||
use crate::ui::model_tt::component::IconDialog;
|
||||
|
||||
@ -59,7 +61,7 @@ pub fn insert_sd_card() -> bool {
|
||||
icon,
|
||||
StrBuffer::from("SD CARD REQUIRED"),
|
||||
theme::button_bar(
|
||||
Button::with_text(StrBuffer::from("OK"))
|
||||
Button::with_text(StrBuffer::from("TRY AGAIN"))
|
||||
.styled(theme::button_default())
|
||||
.map(|msg| {
|
||||
(matches!(msg, ButtonMsg::Clicked)).then(|| CancelConfirmMsg::Confirmed)
|
||||
@ -81,7 +83,7 @@ pub fn retry_wrong_card() -> bool {
|
||||
let title_str = StrBuffer::from("WRONG SD CARD");
|
||||
let title = Label::left_aligned(title_str, theme::TEXT_BOLD).vertically_centered();
|
||||
let msg = Label::left_aligned(
|
||||
StrBuffer::from("Please insert your SD card."),
|
||||
StrBuffer::from("Please insert the correct SD card for this device."),
|
||||
theme::TEXT_NORMAL,
|
||||
);
|
||||
|
||||
@ -116,7 +118,7 @@ pub fn retry_wrong_card() -> bool {
|
||||
icon,
|
||||
StrBuffer::from("WRONG SD CARD"),
|
||||
theme::button_bar(
|
||||
Button::with_text(StrBuffer::from("OK"))
|
||||
Button::with_text(StrBuffer::from("TRY AGAIN"))
|
||||
.styled(theme::button_default())
|
||||
.map(|msg| {
|
||||
(matches!(msg, ButtonMsg::Clicked)).then(|| CancelConfirmMsg::Confirmed)
|
||||
@ -135,14 +137,14 @@ pub fn retry_wrong_card() -> bool {
|
||||
|
||||
#[cfg(feature = "sd_card")]
|
||||
pub fn retry_sd_card() -> bool {
|
||||
let title_str = StrBuffer::from("SD CARD FAILURE");
|
||||
let title_str = StrBuffer::from("SD CARD PROBLEM");
|
||||
let title = Label::left_aligned(title_str, theme::TEXT_BOLD).vertically_centered();
|
||||
let msg = Label::left_aligned(
|
||||
StrBuffer::from("Please insert your SD card."),
|
||||
StrBuffer::from("There was a problem accessing the SD card."),
|
||||
theme::TEXT_NORMAL,
|
||||
);
|
||||
|
||||
let left = Button::with_text("CANCEL").styled(theme::button_default());
|
||||
let left = Button::with_text("ABORT").styled(theme::button_default());
|
||||
let right = Button::with_text("RETRY").styled(theme::button_confirm());
|
||||
|
||||
let mut layout = RustLayout::new(Confirm::new(
|
||||
|
Loading…
Reference in New Issue
Block a user