[FL-1968] Pin code locking (#788)

* Gui: code input module
* Gui: fix size to fit frame
* Desktop: PIN config and lock option
* Gui: code input: cleanup, offset input fields if no header present
* Desktop: move code unlock to desktop_locked scene
* Desktop: fix unlock with back key
* Desktop: bump settings version
* Desktop: correct scene usage.

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
its your bedtime
2021-10-26 21:34:31 +03:00
committed by GitHub
parent 400d672e81
commit fae8d8f23c
23 changed files with 948 additions and 43 deletions
@@ -11,6 +11,7 @@
typedef enum {
DesktopLockMenuEventLock,
DesktopLockMenuEventUnlock,
DesktopLockMenuEventPinLock,
DesktopLockMenuEventExit,
} DesktopLockMenuEvent;
@@ -27,6 +28,7 @@ struct DesktopLockMenuView {
typedef struct {
uint8_t idx;
uint8_t hint_timeout;
bool pin_set;
} DesktopLockMenuViewModel;
void desktop_lock_menu_set_callback(
@@ -35,6 +37,7 @@ void desktop_lock_menu_set_callback(
void* context);
View* desktop_lock_menu_get_view(DesktopLockMenuView* lock_menu);
void desktop_lock_menu_pin_set(DesktopLockMenuView* lock_menu, bool pin_is_set);
void desktop_lock_menu_reset_idx(DesktopLockMenuView* lock_menu);
DesktopLockMenuView* desktop_lock_menu_alloc();
void desktop_lock_menu_free(DesktopLockMenuView* lock_menu);