mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-03 03:50:58 +00:00
ui mockups
This commit is contained in:
parent
727a5f8393
commit
1cb309260a
BIN
assets/trezor_notext.png
Normal file
BIN
assets/trezor_notext.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.1 KiB |
16
bootloader/ui-mockup/boot.py
Executable file
16
bootloader/ui-mockup/boot.py
Executable file
@ -0,0 +1,16 @@
|
||||
#!../../vendor/micropython/unix/micropython
|
||||
import sys
|
||||
sys.path.append('../../src')
|
||||
|
||||
from trezor import ui, res
|
||||
|
||||
ui.display.backlight(255)
|
||||
|
||||
image = res.load('./res/sl_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, 197, "v0.1.1", 1, ui.GREY, ui.BLACK)
|
||||
|
||||
while True:
|
||||
ui.display.refresh()
|
38
bootloader/ui-mockup/boot_info.py
Executable file
38
bootloader/ui-mockup/boot_info.py
Executable file
@ -0,0 +1,38 @@
|
||||
#!../../vendor/micropython/unix/micropython
|
||||
import sys
|
||||
sys.path.append('../../src')
|
||||
|
||||
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.backlight(255)
|
||||
|
||||
# header
|
||||
# ui.display.bar(0, 0, 240, 30, ui.ORANGE, ui.BLACK, 4)
|
||||
# ui.display.bar(0, 10, 240, 20, ui.ORANGE)
|
||||
# ui.display.text(10, 23, 'Bootloader info', ui.BOLD, ui.WHITE, ui.ORANGE)
|
||||
|
||||
image = res.load('./res/sl_logo.toif')
|
||||
ui.display.image(60, 10, image)
|
||||
|
||||
ui.display.text_center(120, 148, "SatoshiLabs firmware", 1, ui.WHITE, ui.BLACK)
|
||||
ui.display.text_center(120, 171, "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()
|
@ -13,5 +13,6 @@ 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()
|
47
bootloader/ui-mockup/boot_unsigned.py
Executable file
47
bootloader/ui-mockup/boot_unsigned.py
Executable file
@ -0,0 +1,47 @@
|
||||
#!../../vendor/micropython/unix/micropython
|
||||
import sys
|
||||
sys.path.append('../../src')
|
||||
|
||||
from trezor import ui
|
||||
from trezor.ui import button
|
||||
|
||||
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)
|
||||
|
||||
# background frame
|
||||
# ui.display.bar(0, 10, 240, 240 - 50, ui.LIGHT_RED)
|
||||
# ui.display.bar(3, 3, 234, 240 - 54, ui.BLACK)
|
||||
|
||||
# header
|
||||
ui.display.bar(0, 0, 240, 30, ui.LIGHT_RED, ui.BLACK, 4)
|
||||
ui.display.bar(0, 10, 240, 20, ui.LIGHT_RED)
|
||||
ui.display.text(10, 23, 'Unsigned firmware!', ui.BOLD, ui.WHITE, ui.LIGHT_RED)
|
||||
|
||||
# content
|
||||
ui.display.text(10, 60, 'Check your 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()
|
37
bootloader/ui-mockup/install_fail.py
Executable file
37
bootloader/ui-mockup/install_fail.py
Executable file
@ -0,0 +1,37 @@
|
||||
#!../../vendor/micropython/unix/micropython
|
||||
import sys
|
||||
sys.path.append('../../src')
|
||||
|
||||
from trezor import ui
|
||||
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.backlight(255)
|
||||
|
||||
# header
|
||||
ui.display.bar(0, 0, 240, 30, ui.LIGHT_RED, ui.BLACK, 4)
|
||||
ui.display.bar(0, 10, 240, 20, ui.LIGHT_RED)
|
||||
ui.display.text(10, 23, 'Install failed', ui.BOLD, ui.WHITE, ui.LIGHT_RED)
|
||||
|
||||
# content
|
||||
# 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:
|
||||
ui.display.refresh()
|
61
bootloader/ui-mockup/install_fw.py
Executable file
61
bootloader/ui-mockup/install_fw.py
Executable file
@ -0,0 +1,61 @@
|
||||
#!../../vendor/micropython/unix/micropython
|
||||
import sys
|
||||
sys.path.append('../../src')
|
||||
|
||||
from trezor import ui
|
||||
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)
|
||||
|
||||
# header
|
||||
ui.display.bar(0, 0, 240, 30, ui.ORANGE, ui.BLACK, 4)
|
||||
ui.display.bar(0, 10, 240, 20, ui.ORANGE)
|
||||
ui.display.text(10, 23, 'Install new firmware', ui.BOLD, ui.WHITE, ui.ORANGE)
|
||||
|
||||
# content
|
||||
ui.display.text(10, 53, 'vendor:', ui.BOLD, ui.GREY, ui.BLACK)
|
||||
ui.display.text(85, 53, 'Monero', ui.NORMAL, ui.WHITE, ui.BLACK)
|
||||
|
||||
ui.display.text(10, 76, 'version:', ui.BOLD, ui.GREY, ui.BLACK)
|
||||
ui.display.text(85, 76, '0.1.1', ui.NORMAL, ui.WHITE, ui.BLACK)
|
||||
|
||||
# fingerprint box
|
||||
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)
|
||||
ui.display.text(15, s + 3 * 23, '43b2b44913b5c255', ui.MONO, ui.GREY, ui.DARK_GREY)
|
||||
|
||||
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()
|
40
bootloader/ui-mockup/install_fw_really.py
Executable file
40
bootloader/ui-mockup/install_fw_really.py
Executable file
@ -0,0 +1,40 @@
|
||||
#!../../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
|
||||
ui.display.bar(0, 0, 240, 30, ui.ORANGE, ui.BLACK, 4)
|
||||
ui.display.bar(0, 10, 240, 20, ui.ORANGE)
|
||||
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()
|
37
bootloader/ui-mockup/install_ok.py
Executable file
37
bootloader/ui-mockup/install_ok.py
Executable file
@ -0,0 +1,37 @@
|
||||
#!../../vendor/micropython/unix/micropython
|
||||
import sys
|
||||
sys.path.append('../../src')
|
||||
|
||||
from trezor import ui
|
||||
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.backlight(255)
|
||||
|
||||
# header
|
||||
ui.display.bar(0, 0, 240, 30, ui.ORANGE, ui.BLACK, 4)
|
||||
ui.display.bar(0, 10, 240, 20, ui.ORANGE)
|
||||
ui.display.text(10, 23, 'Install done', ui.BOLD, ui.WHITE, ui.ORANGE)
|
||||
|
||||
# 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()
|
@ -6,7 +6,13 @@ from trezor import ui
|
||||
|
||||
ui.display.backlight(255)
|
||||
|
||||
ui.display.text_center(120, 192 + 32, "Uploading firmware", 1, ui.WHITE, ui.BLACK)
|
||||
|
||||
# header
|
||||
ui.display.bar(0, 0, 240, 30, ui.ORANGE, ui.BLACK, 4)
|
||||
ui.display.bar(0, 10, 240, 20, ui.ORANGE)
|
||||
ui.display.text(10, 23, 'Installing firmware', ui.BOLD, ui.WHITE, ui.ORANGE)
|
||||
|
||||
ui.display.text_center(120, 192 + 32, "In progress ...", 1, ui.WHITE, ui.BLACK)
|
||||
|
||||
p = 0
|
||||
while True:
|
@ -2,7 +2,7 @@
|
||||
import sys
|
||||
sys.path.append('../../src')
|
||||
|
||||
from trezor import ui, res
|
||||
from trezor import ui
|
||||
from trezor.ui import button
|
||||
|
||||
CONFIRM_BUTTON = {
|
||||
@ -31,10 +31,26 @@ CANCEL_BUTTON_ACTIVE = {
|
||||
}
|
||||
|
||||
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)
|
||||
|
||||
# background frame
|
||||
# ui.display.bar(0, 10, 240, 240 - 50, ui.LIGHT_RED)
|
||||
# ui.display.bar(3, 3, 234, 240 - 54, ui.BLACK)
|
||||
|
||||
# header
|
||||
ui.display.bar(0, 0, 240, 30, ui.LIGHT_RED, ui.BLACK, 4)
|
||||
ui.display.bar(0, 10, 240, 20, ui.LIGHT_RED)
|
||||
ui.display.text(10, 23, 'Install new firmware', ui.BOLD, ui.WHITE, ui.LIGHT_RED)
|
||||
|
||||
# content
|
||||
ui.display.text(10, 60, 'Unsigned firmware!', 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)
|
||||
|
||||
confirm = button.Button((121, 240 - 48, 119, 48), 'Confirm', normal_style=CONFIRM_BUTTON, active_style=CONFIRM_BUTTON_ACTIVE)
|
||||
confirm.render()
|
@ -1,39 +0,0 @@
|
||||
#!../../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()
|
@ -1,31 +0,0 @@
|
||||
#!../../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()
|
Loading…
Reference in New Issue
Block a user