mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-26 09:28:13 +00:00
src/trezor: change textation of pin dialog
This commit is contained in:
parent
db141fbc14
commit
872c44c477
@ -8,9 +8,12 @@ def pin_to_int(pin: str) -> int:
|
|||||||
def show_pin_timeout(seconds: int, progress: int):
|
def show_pin_timeout(seconds: int, progress: int):
|
||||||
if progress == 0:
|
if progress == 0:
|
||||||
ui.display.bar(0, 0, ui.WIDTH, ui.HEIGHT, ui.BG)
|
ui.display.bar(0, 0, ui.WIDTH, ui.HEIGHT, ui.BG)
|
||||||
ui.display.loader(progress, -10, ui.FG, ui.BG)
|
ui.display.text_center(ui.WIDTH // 2, 37, 'Verifying PIN', ui.BOLD, ui.FG, ui.BG, ui.WIDTH)
|
||||||
|
ui.display.loader(progress, 0, ui.FG, ui.BG)
|
||||||
if seconds == 0:
|
if seconds == 0:
|
||||||
ui.display.text_center(ui.WIDTH // 2, ui.HEIGHT - 20, 'Done', ui.BOLD, ui.FG, ui.BG, ui.WIDTH)
|
ui.display.text_center(ui.WIDTH // 2, ui.HEIGHT - 22, 'Done', ui.BOLD, ui.FG, ui.BG, ui.WIDTH)
|
||||||
|
elif seconds == 1:
|
||||||
|
ui.display.text_center(ui.WIDTH // 2, ui.HEIGHT - 22, '1 second left', ui.BOLD, ui.FG, ui.BG, ui.WIDTH)
|
||||||
else:
|
else:
|
||||||
ui.display.text_center(ui.WIDTH // 2, ui.HEIGHT - 20, 'Waiting for %d s' % seconds, ui.BOLD, ui.FG, ui.BG, ui.WIDTH)
|
ui.display.text_center(ui.WIDTH // 2, ui.HEIGHT - 22, '%d seconds left' % seconds, ui.BOLD, ui.FG, ui.BG, ui.WIDTH)
|
||||||
ui.display.refresh()
|
ui.display.refresh()
|
||||||
|
Loading…
Reference in New Issue
Block a user