1
0
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:
Pavol Rusnak 2018-02-25 14:43:41 +01:00
parent db141fbc14
commit 872c44c477
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -8,9 +8,12 @@ def pin_to_int(pin: str) -> int:
def show_pin_timeout(seconds: int, progress: int):
if progress == 0:
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:
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:
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()