} CANCEL_BUTTON_ACTIVE = { 'bg-color': ui.RED, 'fg-color': ui.WHITE, 'text-style': ui.BOLD, 'border-color': ui.RED, } ui.display.backlight(255) # background frame ui.display.bar(0, 10, 240, 240 - 50, ui.LIGHT_RED) ui.display.bar(3, 3, 234, 240 - 54, ui.BLACK) # header bl_header('Unsigned firmware!') # content ui.display.text(10, 60, 'Fingeprint', ui.NORMAL, ui.WHITE, ui.BLACK) # fingerprint box ui.display.bar(10, 76, 220, 105, ui.DARK_GREY) s = 103 ui.display.text(15, s, '5764715dbcf8ed88', ui.MONO, ui.GREY, ui.DARK_GREY) ui.display.text(15, s + 1 * 23, 'bc0ae1c2f715277f', ui.MONO, ui.GREY, ui.DARK_GREY) ui.display.text(15, s + 2 * 23, '22b67f26c15e1f75', ui.MONO, ui.GREY, ui.DARK_GREY) ui.display.text(15, s + 3 * 23, '43b2b44913b5c255', ui.MONO, ui.GREY, ui.DARK_GREY)
#!../../vendor/micropython/unix/micropython import sys sys.path.append('../../src') from trezor import ui from bl_common import bl_header ui.display.clear() ui.display.backlight(255) # header bl_header('Installing firmware') ui.display.text_center(120, 192 + 32, "In progress ...", 1, ui.WHITE, ui.BLACK) p = 0 while True: ui.display.loader(p, 0, ui.BLUE, ui.BLACK) ui.display.text_center(120, 240 // 2 + 14 // 2, "%d%%" % (p // 10), 2, ui.WHITE, ui.BLACK) ui.display.refresh() p = (p + 1) % 1000
'fg-color': ui.LIGHT_RED, 'text-style': ui.BOLD, 'border-color': ui.RED, } CANCEL_BUTTON_ACTIVE = { 'bg-color': ui.RED, 'fg-color': ui.WHITE, 'text-style': ui.BOLD, 'border-color': ui.RED, } ui.display.clear() ui.display.backlight(255) # header bl_header('Install new firmware') # content ui.display.text(10, 53, 'SatoshiLabs v0.1.1', ui.NORMAL, ui.WHITE, ui.BLACK) def fingerprint(): ui.display.bar(0, 60, 240, 128, ui.BLACK) ui.display.text(10, 76, 'Fingerprint:', ui.BOLD, ui.GREY, ui.BLACK) ui.display.bar(10, 82, 220, 102, ui.DARK_GREY) s = 105 ui.display.text(15, s, '5764715dbcf8ed88', ui.MONO, ui.GREY, ui.DARK_GREY) ui.display.text(15, s + 1 * 23, 'bc0ae1c2f715277f', ui.MONO, ui.GREY, ui.DARK_GREY) ui.display.text(15, s + 2 * 23, '22b67f26c15e1f75', ui.MONO, ui.GREY, ui.DARK_GREY)
import sys sys.path.append('../../src') from trezor import ui from trezor.ui import button from bl_common import bl_header ui.display.clear() ui.display.backlight(255) # background frame ui.display.bar(0, 10, 240, 240 - 50, ui.LIGHT_RED) ui.display.bar(3, 3, 234, 240 - 54, ui.BLACK) # header bl_header('Install failed') # 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=button.DEFAULT_BUTTON, active_style=button.DEFAULT_BUTTON_ACTIVE) reboot.render() while True: ui.display.refresh()
'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, } ui.display.clear() ui.display.backlight(255) # header bl_header('Install done') # content # content ui.display.text(10, 53, 'Success!', ui.NORMAL, ui.WHITE, ui.BLACK) ui.display.text(10, 79, 'Time to reboot', 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: ui.display.refresh()