1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-19 22:18:13 +00:00
trezor-firmware/bootloader/ui-mockup/install_fw_really.py

40 lines
1.2 KiB
Python
Raw Normal View History

2016-10-04 16:49:02 +00:00
#!../../vendor/micropython/unix/micropython
import sys
sys.path.append('../../src')
from trezor import ui
from trezor.ui import button
CONFIRM_BUTTON = {
'bg-color': ui.BLUE,
'fg-color': ui.WHITE,
'text-style': ui.BOLD,
'border-color': ui.BLACK,
}
CONFIRM_BUTTON_ACTIVE = {
'bg-color': ui.BLUE,
'fg-color': ui.WHITE,
'text-style': ui.BOLD,
'border-color': ui.BLACK,
}
ui.display.backlight(255)
# header
2016-10-05 17:36:30 +00:00
ui.display.bar(0, 0, 240, 32, ui.ORANGE, ui.BLACK, 4)
ui.display.bar(0, 10, 240, 22, ui.ORANGE)
2016-10-04 16:49:02 +00:00
ui.display.text(10, 23, 'Install new firmware', ui.BOLD, ui.WHITE, ui.ORANGE)
# content
ui.display.text(10, 53, 'Warning!', ui.BOLD, ui.WHITE, ui.BLACK)
ui.display.text(10, 83, 'Never do this without', ui.NORMAL, ui.WHITE, ui.BLACK)
ui.display.text(10, 106, 'your recovery card and', ui.NORMAL, ui.WHITE, ui.BLACK)
ui.display.text(10, 129, 'due to different vendor', ui.NORMAL, ui.WHITE, ui.BLACK)
ui.display.text(10, 151, 'your storage will be', ui.NORMAL, ui.WHITE, ui.BLACK)
ui.display.text(10, 174, 'wipped!', ui.NORMAL, ui.WHITE, ui.BLACK)
confirm = button.Button((0, 240 - 48, 240, 48), 'Hold to confirm', normal_style=CONFIRM_BUTTON, active_style=CONFIRM_BUTTON_ACTIVE)
confirm.render()
while True:
ui.display.refresh()