trezor-firmware
trezor-firmware copied to clipboard
Model-specific homescreen layouts
Currently the homescreen layout is custom written in apps.homescreen. This is becoming more complex as we are adding more different models.
A proposed split would look vaguely like:
- move
HomescreenBasetoui.components.common - move
Homescreen,Lockscreen,RecoveryHomescreentoui.components.tt, quite possibly to a common filehomescreen.py - move
ui.header_warningandui.header_errortoui.components.tt.homescreen(they are not used anywhere else) - extract appropriate parameters
- for Homescreen, the list of possible headers should come in as (for now)
error_header: str | None, warning_header: str | None. In the future we can pass in something likelist[tuple[Level, str]]and the homescreen would decide whether to render everything or only the first/last one.
- for Homescreen, the list of possible headers should come in as (for now)
- provide
trezor.ui.layout.show_homescreen(...)and friends