Skip to content

Commit

Permalink
Merge pull request #55 from LedgerHQ/ui/id_choice_fix
Browse files Browse the repository at this point in the history
Other UI fixes
  • Loading branch information
lpascal-ledger authored Aug 2, 2024
2 parents 0b646cf + 48977c0 commit 0c6c731
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ PATH_APP_LOAD_PARAMS += "5262163'" # int("PKS".encode("ascii").hex(), 16)

APPVERSION_M=1
APPVERSION_N=6
APPVERSION_P=4
APPVERSION_P=5
APPVERSION=$(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P)

ICON_NANOS=icons/icon_security_key_nanos.gif
Expand Down
23 changes: 16 additions & 7 deletions src/ctap2_get_assertion_flow.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,14 +270,23 @@ static const nbgl_layoutTagValue_t pairs[NB_OF_PAIRS] = {
{.item = "Website", .value = g.rpID},
{.item = "User ID", .value = g.verifyHash}};

#define SELECT_MAX_ID_NB 5
#if defined(TARGET_STAX)
#define SELECT_MAX_ID_NB 5
#elif defined(TARGET_FLEX)
#define SELECT_MAX_ID_NB 4
#endif

#define SELECT_ID_BUFFER_SIZE 36
static char user_id_list[SELECT_MAX_ID_NB][SELECT_ID_BUFFER_SIZE];
static const char *const bar_texts[SELECT_MAX_ID_NB] = {user_id_list[0],
user_id_list[1],
user_id_list[2],
user_id_list[3],
user_id_list[4]};
static const char *const bar_texts[SELECT_MAX_ID_NB] = {
user_id_list[0],
user_id_list[1],
user_id_list[2],
user_id_list[3],
#if defined(TARGET_STAX)
user_id_list[4],
#endif // TARGET_STAX
};
static uint8_t token_list[SELECT_MAX_ID_NB];
uint8_t available_credentials;
uint8_t selected_credential;
Expand Down Expand Up @@ -342,7 +351,7 @@ static void on_user_select(void) {
// Reuse useCaseSettings which fit our needs
nbgl_useCaseSettings("User IDs",
0,
(available_credentials - 1 / SELECT_MAX_ID_NB) + 1,
(available_credentials - 1) / SELECT_MAX_ID_NB + 1,
false,
on_user_select_exit,
on_user_select_navigation_callback,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/speculos/snapshots/flex/test_u2f_screens_idle/00001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/speculos/snapshots/nanos/test_u2f_screens_idle/00002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/speculos/snapshots/nanosp/test_u2f_screens_idle/00002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/speculos/snapshots/nanox/test_u2f_screens_idle/00002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/speculos/snapshots/stax/test_u2f_screens_idle/00001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0c6c731

Please sign in to comment.