mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-23 23:08:14 +00:00
feat(core/mercury): allow passphrase in FlowStore
[no changelog]
This commit is contained in:
parent
2203d9be1a
commit
d99a94758b
@ -3,8 +3,8 @@ use crate::{
|
||||
translations::TR,
|
||||
ui::{
|
||||
component::{
|
||||
base::ComponentExt, text::common::TextBox, Component, Event, EventCtx, Label, Maybe,
|
||||
Never, Swipe, SwipeDirection,
|
||||
base::ComponentExt, swipe_detect::SwipeConfig, text::common::TextBox, Component, Event,
|
||||
EventCtx, Label, Maybe, Never, Swipe, SwipeDirection,
|
||||
},
|
||||
display,
|
||||
geometry::{Alignment, Grid, Insets, Offset, Rect},
|
||||
@ -85,6 +85,8 @@ pub struct PassphraseKeyboard {
|
||||
keys: [Button; KEY_COUNT],
|
||||
active_layout: KeyboardLayout,
|
||||
fade: Cell<bool>,
|
||||
swipe_config: SwipeConfig, // FIXME: how about page_swipe
|
||||
internal_page_cnt: usize,
|
||||
}
|
||||
|
||||
const PAGE_COUNT: usize = 4;
|
||||
@ -140,6 +142,8 @@ impl PassphraseKeyboard {
|
||||
}),
|
||||
active_layout,
|
||||
fade: Cell::new(false),
|
||||
swipe_config: SwipeConfig::new(),
|
||||
internal_page_cnt: 1,
|
||||
}
|
||||
}
|
||||
|
||||
@ -447,6 +451,17 @@ impl Component for Input {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "micropython")]
|
||||
impl crate::ui::flow::Swipable for PassphraseKeyboard {
|
||||
fn get_swipe_config(&self) -> SwipeConfig {
|
||||
self.swipe_config
|
||||
}
|
||||
|
||||
fn get_internal_page_count(&self) -> usize {
|
||||
self.internal_page_cnt
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "ui_debug")]
|
||||
impl crate::trace::Trace for PassphraseKeyboard {
|
||||
fn trace(&self, t: &mut dyn crate::trace::Tracer) {
|
||||
|
Loading…
Reference in New Issue
Block a user