2016-10-04 16:49:02 +00:00
|
|
|
#!../../vendor/micropython/unix/micropython
|
|
|
|
import sys
|
|
|
|
sys.path.append('../../src')
|
|
|
|
|
2016-10-05 17:52:28 +00:00
|
|
|
from trezor import ui, res
|
2016-10-04 16:49:02 +00:00
|
|
|
from trezor.ui import button
|
|
|
|
|
|
|
|
DEFAULT_BUTTON = {
|
|
|
|
'bg-color': ui.DARK_GREY,
|
|
|
|
'fg-color': ui.GREY,
|
|
|
|
'text-style': ui.NORMAL,
|
|
|
|
'border-color': ui.BLACK,
|
|
|
|
}
|
|
|
|
DEFAULT_BUTTON_ACTIVE = {
|
|
|
|
'bg-color': ui.GREY,
|
|
|
|
'fg-color': ui.WHITE,
|
|
|
|
'text-style': ui.BOLD,
|
|
|
|
'border-color': ui.GREY,
|
|
|
|
}
|
|
|
|
|
2016-10-05 18:17:32 +00:00
|
|
|
ui.display.clear()
|
2016-10-04 16:49:02 +00:00
|
|
|
ui.display.backlight(255)
|
|
|
|
|
2016-10-05 13:44:23 +00:00
|
|
|
# background frame
|
|
|
|
ui.display.bar(0, 10, 240, 240 - 50, ui.LIGHT_RED)
|
|
|
|
ui.display.bar(3, 3, 234, 240 - 54, ui.BLACK)
|
|
|
|
|
2016-10-04 16:49:02 +00:00
|
|
|
# header
|
2016-10-05 18:36:28 +00:00
|
|
|
ui.display.bar(0, 0, 240, 32, ui.ORANGE)
|
2016-10-05 17:52:28 +00:00
|
|
|
|
|
|
|
image = res.load('./res/bootloader.toig')
|
|
|
|
ui.display.icon(8, 4, image, ui.ORANGE, ui.WHITE)
|
|
|
|
|
|
|
|
ui.display.text(35, 23, 'Install failed', ui.BOLD, ui.WHITE, ui.ORANGE)
|
2016-10-04 16:49:02 +00:00
|
|
|
|
|
|
|
# content
|
|
|
|
ui.display.text(10, 53, 'Some error happend', ui.NORMAL, ui.WHITE, ui.BLACK)
|
|
|
|
ui.display.text(10, 79, 'Sorry, try again maybe?', ui.NORMAL, ui.WHITE, ui.BLACK)
|
|
|
|
|
|
|
|
reboot = button.Button((0, 240 - 48, 240, 48), 'Reboot', normal_style=DEFAULT_BUTTON, active_style=DEFAULT_BUTTON_ACTIVE)
|
|
|
|
reboot.render()
|
|
|
|
|
|
|
|
while True:
|
2016-10-05 18:36:28 +00:00
|
|
|
if hasattr(ui.display, 'refresh'): ui.display.refresh()
|