1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-12 18:49:07 +00:00
Commit Graph

162 Commits

Author SHA1 Message Date
Martin Milata
8b3ac659a0 style(core): mypy: disable implicit Optional for function arguments
https://www.python.org/dev/peps/pep-0484/#union-types
2021-04-01 11:12:30 +02:00
Martin Milata
da72482c2f refactor(core/ui): get rid of confirm_wipe 2021-03-30 22:34:01 +02:00
Martin Milata
c0174ff217 refactor(core/ui): raise exception on dialog cancel by default 2021-03-30 22:34:01 +02:00
Martin Milata
b1e38fe382 refactor(core): no implicit spaces in render_text 2021-03-30 22:34:01 +02:00
Martin Milata
ffe6d65f72 refactor(core): convert parts of apps.management to layouts 2021-03-30 22:34:01 +02:00
Martin Milata
6ded531f8f refactor(core): convert apps.common.sdcard to layouts 2021-03-30 22:34:01 +02:00
Andrew Kozlik
3084d1196d feat(core): Support 50 digit PIN and wipe code. 2021-03-25 14:24:41 +01:00
Martin Milata
c28763c169 refactor(core): use reload_settings_from_storage on boot 2021-02-24 00:10:10 +01:00
Martin Milata
06b9d1314d fix(core): do not autolock when already locked
Gets rid of unnecessary screen redraw.
2021-02-24 00:10:10 +01:00
Martin Milata
03699f5639 refactor(core): turn show_success, show_warning into layouts 2021-02-10 13:57:19 +01:00
Martin Milata
f38abf9d89 refactor(core): introduce layouts
Layouts can be used by the application code to interact with user using
small number of dialogs or other groups of UI components. Each layout is
identified by name and takes some parameters. Most layouts will have an
implementation for each hardware model, mechanism is provided to import
the correct version so that application code can be oblivious to the
model.

This commit introduces the layout concept and converts a couple of
dialogs to use it.
2021-02-10 13:57:19 +01:00
Martin Milata
f1382bf892 refactor(core): model-dependent UI component directories
They now live under trezor.ui.components.tt. Later
trezor.ui.components.t1 will be added and application code will be
rewritten to not use them directly in order to work on both TT and T1.
2021-02-10 13:57:19 +01:00
matejcik
fc4e15fe77 feat(core): introduce and enforce limit on label length (fixes #1399) 2021-01-12 11:22:58 +01:00
Andrew Kozlik
aeb021b159 chore(core): Improve naming of SLIP39's T9 mask lookup. 2020-12-15 13:41:42 +01:00
Pavol Rusnak
1e8673bf5f style(core/apps): use new syntax for typing 2020-12-01 15:52:29 +01:00
Martin Milata
fa1566cb71 refactor(core): call super().__init__() in Component and Layout subclasses 2020-11-30 14:48:08 +01:00
matejcik
37d3bf56fa fix(core): make sure run-time settings are reset after wipe (fixes #1322) 2020-11-05 15:33:38 +01:00
matejcik
4ca8f7b0d6 style(core): use relative imports everywhere
except Monero, which has a rather complex structure and I don't want to
search&replace mess with it in case some of the things break memory
layout
2020-11-05 14:30:11 +01:00
Martin Milata
830592f2d9 feat(core): add experimental_features setting
The setting is off by default. When it is enabled protobuf messages
marked UNSTABLE are rejected after decoding.
2020-10-16 13:53:31 +02:00
matejcik
e4785d47e0 style: apply black 20.8b1 2020-09-29 11:30:40 +02:00
matejcik
244b264b47 chore(core): fix typing and kwargs usage 2020-09-23 16:00:10 +02:00
Martin Milata
cff4955f93 core: implement SafetyChecks.PromptTemporarily
Also reword safety checks confirmation dialogs.
2020-09-18 09:02:40 +02:00
Martin Milata
1b982659c4
core: fix boot loop after uploading invalid homescreen (#1205) 2020-08-21 12:00:42 +02:00
Pavol Rusnak
4e11735d22 core/modtrezorui: remove prefill from text functions
use display.bar where needed to prefill the areas
2020-08-07 15:08:14 +02:00
matejcik
fdcb64ac24 all: rename protobuf unsafe_prompts to safety_checks 2020-07-24 16:37:58 +02:00
matejcik
57b08c98ed core: raise error on setting passphrase-on-device without passphrase 2020-07-24 16:37:58 +02:00
matejcik
8e44132d3c core: replace load_settings with individual setters 2020-07-24 16:37:58 +02:00
matejcik
1109250dcf core: add option to allow unsafe prompts 2020-07-24 16:37:58 +02:00
Martin Milata
fd117a0c9f core: raise error on auto-lock value out of range 2020-07-22 21:38:42 +02:00
matejcik
051763575d core: touch idle timer in keyboards (fixes #1099) 2020-07-10 14:05:52 +02:00
Tomas Susanka
a6acefbdf5 core: wipe before reset and recovery; introduce 'intialized' field 2020-06-16 11:31:29 +02:00
Tomas Susanka
b67be7dd9e core: forbid all settings if not initialized 2020-06-11 18:47:01 +02:00
matejcik
872e0fb0e0 core: lower scheduler resolution to milliseconds
This avoids problems with large timeouts causing the scheduler queue to
think the time counter has overflown, and ordering the autolock task before
immediate tasks.

The maximum reasonable time difference is 0x20000000, which in
microseconds is ~8 minutes, but in milliseconds a more reasonable ~6
days.
2020-06-04 16:18:46 +02:00
matejcik
01832d5ae9 core: call close_others() in place of ButtonRequest
this makes sense, really: close_others() requests UI exclusivity, and
that is something that generally happens at the same places we emit a
ButtonRequest
2020-06-04 16:18:46 +02:00
matejcik
4035aad51b core: implement auto-lock after a configurable timeout (fixes #75) 2020-06-04 16:18:46 +02:00
matejcik
246998910a core: refactor usage of input_signals
this prevents a certain class of UI test failure. It also localizes the
use of debuglink signals into the layout classes instead of call sites,
which is a design we were already using for confirm_signals
2020-06-04 16:18:46 +02:00
matejcik
09af8aed4e core: consider lockscreen to be a separate homescreen
this involves some changes to the workflow defaults:

* workflow.start_default() takes no arguments
* workflow.set_default() (originally replace_default) configures the
  default that will be started by next call to start_default().
  The intended usecase is to set_default() first and then start it
  separately.
* apps.base.set_homescreen() factors out the logic originally in
  main.py, that decides which homescreen should be launched. This uses
  set_default() call. start_default() is then used explicitly in main.py
2020-06-04 16:18:46 +02:00
matejcik
32fcc4ad9c core: make verify_user_pin accept a Context argument 2020-06-04 16:18:46 +02:00
matejcik
8ca7ffc3b8 core: use wire.PinCancelled/PinInvalid instead of custom versions
also refactor show_pin_invalid and its usages so that it raises directly

note that we are now using PinCancelled instead of ActionCancelled where
appropriate
2020-06-04 16:18:46 +02:00
matejcik
eabfcab9b9 core: add default messages to some error codes 2020-06-04 16:18:46 +02:00
Tomas Susanka
1ac0f60550 core: update isort config to place relative imports last 2020-05-18 14:31:51 +02:00
Tomas Susanka
0b7a8449f8 core: style 2020-03-30 16:04:05 +00:00
Tomas Susanka
bf20537f41 core: add option to omit cancel button in HoldToConfirm; add it to reset 2020-03-30 16:00:12 +00:00
Tomas Susanka
aa71c20f2c core: require hold to confirm 2020-03-24 09:20:10 +00:00
Konnor Klashinsky
70a1f957ed
Fix BackupDevice layout on 18-word seed wallets 2020-03-13 13:41:04 +13:00
matejcik
1e9352b9e0 core: add SD format dialog, generalize sdcard usage 2020-02-20 12:51:48 +01:00
matejcik
938f347514
core: use DUMMY_CONTEXT constant instead of own instance 2020-02-07 11:41:02 +00:00
Tomas Susanka
d5763d9cab
all: implement code review comments 2020-02-07 11:41:01 +00:00
Tomas Susanka
cd09f9ce94
all: modify passphrase source to always on device 2020-02-07 11:40:59 +00:00
Tomas Susanka
277e494ffa core/recovery: end dry run before showing success
updates #815
2020-02-03 12:12:49 +00:00