Exemple #1
0
# 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)

cancel = button.Button((0, 240 - 48, 240, 48),
                       'Proceed anyway',
                       normal_style=CANCEL_BUTTON,
                       active_style=CANCEL_BUTTON_ACTIVE)
cancel.render()

while True:
    ui.display.refresh()
Exemple #2
0
    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)


def logo():
    ui.display.bar(0, 60, 240, 128, ui.BLACK)
    image = res.load('./res/sl_logo.toif')
    ui.display.image(60, 64, image)


confirm = button.Button((121, 240 - 48, 119, 48),
                        'Confirm',
                        normal_style=CONFIRM_BUTTON,
                        active_style=CONFIRM_BUTTON_ACTIVE)
confirm.render()
cancel = button.Button((0, 240 - 48, 119, 48),
                       'Cancel',
                       normal_style=CANCEL_BUTTON,
                       active_style=CANCEL_BUTTON_ACTIVE)
cancel.render()

while True:
    logo()
    ui.display.refresh()
    utime.sleep(2)

    fingerprint()
    ui.display.refresh()
Exemple #3
0
from trezor import ui, res
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,
}
ui.display.clear()
ui.display.backlight(255)

image = res.load('./res/sl_logo.toif')
ui.display.image(60, 10, image)

ui.display.text_center(120, 160, "SatoshiLabs", 1, ui.WHITE, ui.BLACK)
ui.display.text_center(120, 183, "v0.1.1", 1, ui.GREY, 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()
Exemple #4
0
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)

# header
bl_header('Install new firmware')

# 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=button.CONFIRM_BUTTON,
                        active_style=button.CONFIRM_BUTTON_ACTIVE)
confirm.render()

while True:
    ui.display.refresh()