|
@@ -44,12 +44,18 @@ static uint8_t digit_no;
|
44
|
44
|
// Screen for both editing and setting the password
|
45
|
45
|
//
|
46
|
46
|
void Password::menu_password_entry() {
|
|
47
|
+ ui.defer_status_screen(!did_first_run); // No timeout to status before first auth
|
|
48
|
+
|
47
|
49
|
START_MENU();
|
48
|
50
|
|
49
|
51
|
// "Login" or "New Code"
|
50
|
52
|
STATIC_ITEM_P(authenticating ? GET_TEXT(MSG_LOGIN_REQUIRED) : GET_TEXT(MSG_EDIT_PASSWORD), SS_CENTER|SS_INVERT);
|
51
|
53
|
|
52
|
|
- STATIC_ITEM_P(NUL_STR, SS_CENTER|SS_INVERT, string);
|
|
54
|
+ STATIC_ITEM_P(NUL_STR, SS_CENTER, string);
|
|
55
|
+
|
|
56
|
+ #if HAS_MARLINUI_U8GLIB
|
|
57
|
+ STATIC_ITEM_P(NUL_STR, SS_CENTER, "");
|
|
58
|
+ #endif
|
53
|
59
|
|
54
|
60
|
// Make the digit edit item look like a sub-menu
|
55
|
61
|
PGM_P const label = GET_TEXT(MSG_ENTER_DIGIT);
|
|
@@ -57,7 +63,7 @@ void Password::menu_password_entry() {
|
57
|
63
|
MENU_ITEM_ADDON_START(utf8_strlen_P(label) + 1);
|
58
|
64
|
lcd_put_wchar(' ');
|
59
|
65
|
lcd_put_wchar('1' + digit_no);
|
60
|
|
- SETCURSOR_X(LCD_WIDTH - 1);
|
|
66
|
+ SETCURSOR_X(LCD_WIDTH - 2);
|
61
|
67
|
lcd_put_wchar('>');
|
62
|
68
|
MENU_ITEM_ADDON_END();
|
63
|
69
|
|
|
@@ -104,7 +110,7 @@ void Password::screen_password_entry() {
|
104
|
110
|
value_entry = 0;
|
105
|
111
|
digit_no = 0;
|
106
|
112
|
editable.uint8 = 0;
|
107
|
|
- memset(string, '-', PASSWORD_LENGTH);
|
|
113
|
+ memset(string, '_', PASSWORD_LENGTH);
|
108
|
114
|
string[PASSWORD_LENGTH] = '\0';
|
109
|
115
|
menu_password_entry();
|
110
|
116
|
}
|
|
@@ -120,7 +126,6 @@ void Password::authenticate_user(const screenFunc_t in_succ_scr, const screenFun
|
120
|
126
|
if (is_set) {
|
121
|
127
|
authenticating = true;
|
122
|
128
|
ui.goto_screen(screen_password_entry);
|
123
|
|
- ui.defer_status_screen();
|
124
|
129
|
ui.update();
|
125
|
130
|
}
|
126
|
131
|
else {
|