mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-19 05:58:09 +00:00
fixed wipe device header
This commit is contained in:
parent
5a20a48745
commit
cb2399197f
@ -10,8 +10,9 @@ async def layout_wipe_device(message, session_id):
|
||||
from ..common import storage
|
||||
|
||||
ui.display.clear()
|
||||
ui.header('Wiping device', ui.ICON_WIPE, ui.BLACK, ui.LIGHT_GREEN)
|
||||
content = Text(
|
||||
'Wiping device',
|
||||
ui.ICON_WIPE,
|
||||
ui.BOLD, 'Do you really want to', 'wipe the device?',
|
||||
ui.NORMAL, '', 'All data will be lost.')
|
||||
await hold_to_confirm(session_id, content)
|
||||
|
@ -8,14 +8,16 @@ TEXT_MARGIN_LEFT = const(10)
|
||||
|
||||
class Text:
|
||||
|
||||
def __init__(self, header, *content):
|
||||
def __init__(self, header, icon, *content):
|
||||
self.header = header
|
||||
self.icon = icon
|
||||
self.content = content
|
||||
|
||||
def render(self):
|
||||
offset = TEXT_LINE_HEIGHT
|
||||
offset += TEXT_HEADER_HEIGHT
|
||||
style = ui.NORMAL
|
||||
ui.header(self.header, self.icon, ui.BLACK, ui.LIGHT_GREEN)
|
||||
for item in self.content:
|
||||
if isinstance(item, str):
|
||||
ui.display.text(TEXT_MARGIN_LEFT, offset,
|
||||
|
Loading…
Reference in New Issue
Block a user