mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 07:28:10 +00:00
added mockups for bootloader
This commit is contained in:
parent
a1b75b879d
commit
c36ccfefb5
BIN
bootloader/ui-mockup/logo.toif
Normal file
BIN
bootloader/ui-mockup/logo.toif
Normal file
Binary file not shown.
45
bootloader/ui-mockup/upload-request.py
Executable file
45
bootloader/ui-mockup/upload-request.py
Executable file
@ -0,0 +1,45 @@
|
||||
#!../../vendor/micropython/unix/micropython
|
||||
import sys
|
||||
sys.path.append('../../src')
|
||||
|
||||
from trezor import ui, res
|
||||
from trezor.ui import button
|
||||
|
||||
CONFIRM_BUTTON = {
|
||||
'bg-color': ui.GREEN,
|
||||
'fg-color': ui.LIGHT_GREEN,
|
||||
'text-style': ui.BOLD,
|
||||
'border-color': ui.GREEN,
|
||||
}
|
||||
CONFIRM_BUTTON_ACTIVE = {
|
||||
'bg-color': ui.GREEN,
|
||||
'fg-color': ui.WHITE,
|
||||
'text-style': ui.BOLD,
|
||||
'border-color': ui.GREEN,
|
||||
}
|
||||
CANCEL_BUTTON = {
|
||||
'bg-color': ui.RED,
|
||||
'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.backlight(255)
|
||||
ui.display.text(10, 30, 'Firmware upload', ui.BOLD, ui.LIGHT_GREEN, ui.BLACK)
|
||||
ui.display.text(10, 60, 'Install new firmware?', ui.BOLD, ui.WHITE, ui.BLACK)
|
||||
ui.display.text(10, 90, 'Never do this without', ui.NORMAL, ui.WHITE, ui.BLACK)
|
||||
ui.display.text(10, 120, 'your recovery card!', ui.NORMAL, ui.WHITE, ui.BLACK)
|
||||
|
||||
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:
|
||||
ui.display.refresh()
|
@ -6,8 +6,7 @@ from trezor import ui
|
||||
|
||||
ui.display.backlight(255)
|
||||
|
||||
ui.display.bar(0, 192, 240, 48, ui.ORANGE)
|
||||
ui.display.text_center(120, 192 + 32, "Installing Update", 1, ui.WHITE, ui.ORANGE)
|
||||
ui.display.text_center(120, 192 + 32, "Uploading firmware", 1, ui.WHITE, ui.BLACK)
|
||||
|
||||
p = 0
|
||||
while True:
|
39
bootloader/ui-mockup/welcome-fw-unasigned.py
Executable file
39
bootloader/ui-mockup/welcome-fw-unasigned.py
Executable file
@ -0,0 +1,39 @@
|
||||
#!../../vendor/micropython/unix/micropython
|
||||
import sys
|
||||
sys.path.append('../../src')
|
||||
|
||||
from trezor import ui, res
|
||||
from trezor.ui import button
|
||||
|
||||
CONFIRM_BUTTON = {
|
||||
'bg-color': ui.GREEN,
|
||||
'fg-color': ui.LIGHT_GREEN,
|
||||
'text-style': ui.BOLD,
|
||||
'border-color': ui.GREEN,
|
||||
}
|
||||
CONFIRM_BUTTON_ACTIVE = {
|
||||
'bg-color': ui.GREEN,
|
||||
'fg-color': ui.WHITE,
|
||||
'text-style': ui.BOLD,
|
||||
'border-color': ui.GREEN,
|
||||
}
|
||||
|
||||
ui.display.backlight(255)
|
||||
|
||||
image = res.load('./logo.toif')
|
||||
ui.display.image(60, 0, image)
|
||||
|
||||
|
||||
ui.display.text_center(120, 144, "SatoshiLabs firmware", 1, ui.WHITE, ui.BLACK)
|
||||
ui.display.text_center(120, 164, "v0.1.1", 1, ui.GREY, ui.BLACK)
|
||||
|
||||
confirm = button.Button((0, 240 - 48, 240, 48), 'Start anyway', normal_style=CONFIRM_BUTTON, active_style=CONFIRM_BUTTON_ACTIVE)
|
||||
confirm.render()
|
||||
|
||||
ui.display.bar(1, 1, 238, 38, ui.LIGHT_RED)
|
||||
ui.display.bar(3, 3, 234, 34, ui.BLACK)
|
||||
ui.display.text_center(120, 26, "Unsigned firmware!", 1, ui.LIGHT_RED, ui.BLACK)
|
||||
|
||||
|
||||
while True:
|
||||
ui.display.refresh()
|
31
bootloader/ui-mockup/welcome-fw.py
Executable file
31
bootloader/ui-mockup/welcome-fw.py
Executable file
@ -0,0 +1,31 @@
|
||||
#!../../vendor/micropython/unix/micropython
|
||||
import sys
|
||||
sys.path.append('../../src')
|
||||
|
||||
from trezor import ui, res
|
||||
from trezor.ui import button
|
||||
|
||||
CONFIRM_BUTTON = {
|
||||
'bg-color': ui.GREEN,
|
||||
'fg-color': ui.LIGHT_GREEN,
|
||||
'text-style': ui.BOLD,
|
||||
'border-color': ui.GREEN,
|
||||
}
|
||||
CONFIRM_BUTTON_ACTIVE = {
|
||||
'bg-color': ui.GREEN,
|
||||
'fg-color': ui.WHITE,
|
||||
'text-style': ui.BOLD,
|
||||
'border-color': ui.GREEN,
|
||||
}
|
||||
|
||||
ui.display.backlight(255)
|
||||
|
||||
image = res.load('./logo.toif')
|
||||
ui.display.image(60, 20, image)
|
||||
|
||||
|
||||
ui.display.text_center(120, 174, "SatoshiLabs firmware", 1, ui.WHITE, ui.BLACK)
|
||||
ui.display.text_center(120, 194, "v0.1.1", 1, ui.GREY, ui.BLACK)
|
||||
|
||||
while True:
|
||||
ui.display.refresh()
|
17
bootloader/ui-mockup/welcome-nofw.py
Executable file
17
bootloader/ui-mockup/welcome-nofw.py
Executable file
@ -0,0 +1,17 @@
|
||||
#!../../vendor/micropython/unix/micropython
|
||||
import sys
|
||||
sys.path.append('../../src')
|
||||
|
||||
from trezor import ui, res
|
||||
|
||||
ui.display.backlight(255)
|
||||
|
||||
image = res.load('../../src/apps/homescreen/res/trezor.toig')
|
||||
ui.display.icon(0, 0, image, ui.WHITE, ui.BLACK)
|
||||
ui.display.bar(0, 175, 240, 48, ui.BLACK)
|
||||
|
||||
|
||||
ui.display.text_center(120, 192 + 32, "Visit TREZOR.io/start", 1, ui.WHITE, ui.BLACK)
|
||||
|
||||
while True:
|
||||
ui.display.refresh()
|
Loading…
Reference in New Issue
Block a user