mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-05-05 16:39:08 +00:00
feat(core/ui): drop UI1 remnats
[no changelog]
This commit is contained in:
parent
52f0c70b95
commit
95d26fe04a
@ -65,8 +65,8 @@ if __debug__:
|
|||||||
|
|
||||||
async def _dispatch_debuglink_decision(msg: DebugLinkDecision) -> None:
|
async def _dispatch_debuglink_decision(msg: DebugLinkDecision) -> None:
|
||||||
from trezor.enums import DebugButton, DebugSwipeDirection
|
from trezor.enums import DebugButton, DebugSwipeDirection
|
||||||
from trezor.ui import Result
|
from trezor.ui import (
|
||||||
from trezor.ui.components.common import (
|
Result,
|
||||||
SWIPE_UP,
|
SWIPE_UP,
|
||||||
SWIPE_DOWN,
|
SWIPE_DOWN,
|
||||||
SWIPE_LEFT,
|
SWIPE_LEFT,
|
||||||
|
@ -16,6 +16,14 @@ MONO: int = Display.FONT_MONO
|
|||||||
WIDTH: int = Display.WIDTH
|
WIDTH: int = Display.WIDTH
|
||||||
HEIGHT: int = Display.HEIGHT
|
HEIGHT: int = Display.HEIGHT
|
||||||
|
|
||||||
|
if __debug__:
|
||||||
|
# common symbols to transfer swipes between debuglink and the UI
|
||||||
|
SWIPE_UP = const(0x01)
|
||||||
|
SWIPE_DOWN = const(0x02)
|
||||||
|
SWIPE_LEFT = const(0x04)
|
||||||
|
SWIPE_RIGHT = const(0x08)
|
||||||
|
|
||||||
|
|
||||||
# channel used to cancel layouts, see `Cancelled` exception
|
# channel used to cancel layouts, see `Cancelled` exception
|
||||||
layout_chan = loop.chan()
|
layout_chan = loop.chan()
|
||||||
|
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
"""
|
|
||||||
The components/common module contains code that is used by both components/tt
|
|
||||||
and components/t1.
|
|
||||||
"""
|
|
||||||
from micropython import const
|
|
||||||
|
|
||||||
SWIPE_UP = const(0x01)
|
|
||||||
SWIPE_DOWN = const(0x02)
|
|
||||||
SWIPE_LEFT = const(0x04)
|
|
||||||
SWIPE_RIGHT = const(0x08)
|
|
@ -7,7 +7,6 @@ from trezor.wire import ActionCancelled
|
|||||||
|
|
||||||
import trezorui2
|
import trezorui2
|
||||||
|
|
||||||
from ...components.common.confirm import CANCELLED, CONFIRMED, INFO
|
|
||||||
from ..common import button_request, interact
|
from ..common import button_request, interact
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
@ -21,6 +20,10 @@ if TYPE_CHECKING:
|
|||||||
|
|
||||||
BR_TYPE_OTHER = ButtonRequestType.Other # global_import_cache
|
BR_TYPE_OTHER = ButtonRequestType.Other # global_import_cache
|
||||||
|
|
||||||
|
CONFIRMED = trezorui2.CONFIRMED
|
||||||
|
CANCELLED = trezorui2.CANCELLED
|
||||||
|
INFO = trezorui2.INFO
|
||||||
|
|
||||||
|
|
||||||
class _RustLayout(ui.Layout):
|
class _RustLayout(ui.Layout):
|
||||||
# pylint: disable=super-init-not-called
|
# pylint: disable=super-init-not-called
|
||||||
@ -66,7 +69,7 @@ class _RustLayout(ui.Layout):
|
|||||||
|
|
||||||
async def handle_swipe(self):
|
async def handle_swipe(self):
|
||||||
from apps.debug import notify_layout_change, swipe_signal
|
from apps.debug import notify_layout_change, swipe_signal
|
||||||
from trezor.ui.components.common import (
|
from trezor.ui import (
|
||||||
SWIPE_UP,
|
SWIPE_UP,
|
||||||
SWIPE_DOWN,
|
SWIPE_DOWN,
|
||||||
SWIPE_LEFT,
|
SWIPE_LEFT,
|
||||||
|
Loading…
Reference in New Issue
Block a user