mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 15:38:11 +00:00
src/apps/homescreen: show warning if PIN is not set
This commit is contained in:
parent
e7b761e66f
commit
ab98322d4d
@ -1,4 +1,4 @@
|
||||
from trezor import ui, res
|
||||
from trezor import ui, res, config
|
||||
from trezor.ui.swipe import Swipe, degrees
|
||||
from apps.common import storage
|
||||
|
||||
@ -30,6 +30,10 @@ def display_homescreen():
|
||||
ui.display.bar(0, 0, ui.WIDTH, 30, ui.YELLOW)
|
||||
ui.display.text_center(ui.WIDTH // 2, 22, 'NEEDS BACKUP!', ui.BOLD, ui.BLACK, ui.YELLOW)
|
||||
ui.display.bar(0, 30, ui.WIDTH, ui.HEIGHT - 30, ui.BG)
|
||||
elif not config.has_pin():
|
||||
ui.display.bar(0, 0, ui.WIDTH, 30, ui.YELLOW)
|
||||
ui.display.text_center(ui.WIDTH // 2, 22, 'PIN NOT SET!', ui.BOLD, ui.BLACK, ui.YELLOW)
|
||||
ui.display.bar(0, 30, ui.WIDTH, ui.HEIGHT - 30, ui.BG)
|
||||
else:
|
||||
ui.display.bar(0, 0, ui.WIDTH, ui.HEIGHT, ui.BG)
|
||||
ui.display.avatar(48, 48 - 10, image, ui.WHITE, ui.BLACK)
|
||||
|
Loading…
Reference in New Issue
Block a user