mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-12 20:49:49 +04:00
fmt + update subbrute submodule
This commit is contained in:
@@ -268,7 +268,6 @@ static void
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
snake_state->currentMovement = snake_game_get_turn_snake(snake_state);
|
snake_state->currentMovement = snake_game_get_turn_snake(snake_state);
|
||||||
|
|
||||||
Point next_step = snake_game_get_next_step(snake_state);
|
Point next_step = snake_game_get_next_step(snake_state);
|
||||||
|
|||||||
Submodule applications/plugins/subbrute updated: 936023c8fb...ed49dcbfcd
@@ -90,7 +90,9 @@ void totp_scene_app_settings_render(Canvas* const canvas, PluginState* plugin_st
|
|||||||
scene_state->selected_control == ConfirmButton);
|
scene_state->selected_control == ConfirmButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool totp_scene_app_settings_handle_event(const PluginEvent* const event, PluginState* plugin_state) {
|
bool totp_scene_app_settings_handle_event(
|
||||||
|
const PluginEvent* const event,
|
||||||
|
PluginState* plugin_state) {
|
||||||
if(event->type == EventTypeKey) {
|
if(event->type == EventTypeKey) {
|
||||||
SceneState* scene_state = (SceneState*)plugin_state->current_scene_state;
|
SceneState* scene_state = (SceneState*)plugin_state->current_scene_state;
|
||||||
if(event->input.type == InputTypePress) {
|
if(event->input.type == InputTypePress) {
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ void totp_scene_app_settings_activate(
|
|||||||
PluginState* plugin_state,
|
PluginState* plugin_state,
|
||||||
const AppSettingsSceneContext* context);
|
const AppSettingsSceneContext* context);
|
||||||
void totp_scene_app_settings_render(Canvas* const canvas, PluginState* plugin_state);
|
void totp_scene_app_settings_render(Canvas* const canvas, PluginState* plugin_state);
|
||||||
bool totp_scene_app_settings_handle_event(const PluginEvent* const event, PluginState* plugin_state);
|
bool totp_scene_app_settings_handle_event(
|
||||||
|
const PluginEvent* const event,
|
||||||
|
PluginState* plugin_state);
|
||||||
void totp_scene_app_settings_deactivate(PluginState* plugin_state);
|
void totp_scene_app_settings_deactivate(PluginState* plugin_state);
|
||||||
void totp_scene_app_settings_free(const PluginState* plugin_state);
|
void totp_scene_app_settings_free(const PluginState* plugin_state);
|
||||||
@@ -73,7 +73,9 @@ void totp_scene_authenticate_render(Canvas* const canvas, PluginState* plugin_st
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool totp_scene_authenticate_handle_event(const PluginEvent* const event, PluginState* plugin_state) {
|
bool totp_scene_authenticate_handle_event(
|
||||||
|
const PluginEvent* const event,
|
||||||
|
PluginState* plugin_state) {
|
||||||
if(event->type == EventTypeKey) {
|
if(event->type == EventTypeKey) {
|
||||||
if(event->input.type == InputTypeLong && event->input.key == InputKeyBack) {
|
if(event->input.type == InputTypeLong && event->input.key == InputKeyBack) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -9,6 +9,8 @@
|
|||||||
void totp_scene_authenticate_init(PluginState* plugin_state);
|
void totp_scene_authenticate_init(PluginState* plugin_state);
|
||||||
void totp_scene_authenticate_activate(PluginState* plugin_state);
|
void totp_scene_authenticate_activate(PluginState* plugin_state);
|
||||||
void totp_scene_authenticate_render(Canvas* const canvas, PluginState* plugin_state);
|
void totp_scene_authenticate_render(Canvas* const canvas, PluginState* plugin_state);
|
||||||
bool totp_scene_authenticate_handle_event(const PluginEvent* const event, PluginState* plugin_state);
|
bool totp_scene_authenticate_handle_event(
|
||||||
|
const PluginEvent* const event,
|
||||||
|
PluginState* plugin_state);
|
||||||
void totp_scene_authenticate_deactivate(PluginState* plugin_state);
|
void totp_scene_authenticate_deactivate(PluginState* plugin_state);
|
||||||
void totp_scene_authenticate_free(const PluginState* plugin_state);
|
void totp_scene_authenticate_free(const PluginState* plugin_state);
|
||||||
|
|||||||
@@ -5,7 +5,11 @@
|
|||||||
#define TEXT_BOX_HEIGHT 13
|
#define TEXT_BOX_HEIGHT 13
|
||||||
#define TEXT_BOX_MARGIN 4
|
#define TEXT_BOX_MARGIN 4
|
||||||
|
|
||||||
void ui_control_text_box_render(Canvas* const canvas, int16_t y, const char* text, bool is_selected) {
|
void ui_control_text_box_render(
|
||||||
|
Canvas* const canvas,
|
||||||
|
int16_t y,
|
||||||
|
const char* text,
|
||||||
|
bool is_selected) {
|
||||||
if(y < -TEXT_BOX_HEIGHT) {
|
if(y < -TEXT_BOX_HEIGHT) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,11 @@
|
|||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <gui/gui.h>
|
#include <gui/gui.h>
|
||||||
|
|
||||||
void ui_control_text_box_render(Canvas* const canvas, int16_t y, const char* text, bool is_selected);
|
void ui_control_text_box_render(
|
||||||
|
Canvas* const canvas,
|
||||||
|
int16_t y,
|
||||||
|
const char* text,
|
||||||
|
bool is_selected);
|
||||||
void ui_control_button_render(
|
void ui_control_button_render(
|
||||||
Canvas* const canvas,
|
Canvas* const canvas,
|
||||||
int16_t x,
|
int16_t x,
|
||||||
|
|||||||
@@ -52,7 +52,13 @@ static bool totp_plugin_state_init(PluginState* const plugin_state) {
|
|||||||
if(plugin_state->crypto_verify_data == NULL) {
|
if(plugin_state->crypto_verify_data == NULL) {
|
||||||
DialogMessage* message = dialog_message_alloc();
|
DialogMessage* message = dialog_message_alloc();
|
||||||
dialog_message_set_buttons(message, "No", NULL, "Yes");
|
dialog_message_set_buttons(message, "No", NULL, "Yes");
|
||||||
dialog_message_set_text(message, "Would you like to setup PIN?", SCREEN_WIDTH_CENTER, SCREEN_HEIGHT_CENTER, AlignCenter, AlignCenter);
|
dialog_message_set_text(
|
||||||
|
message,
|
||||||
|
"Would you like to setup PIN?",
|
||||||
|
SCREEN_WIDTH_CENTER,
|
||||||
|
SCREEN_HEIGHT_CENTER,
|
||||||
|
AlignCenter,
|
||||||
|
AlignCenter);
|
||||||
DialogMessageButton dialog_result = dialog_message_show(plugin_state->dialogs, message);
|
DialogMessageButton dialog_result = dialog_message_show(plugin_state->dialogs, message);
|
||||||
dialog_message_free(message);
|
dialog_message_free(message);
|
||||||
if(dialog_result == DialogMessageButtonRight) {
|
if(dialog_result == DialogMessageButtonRight) {
|
||||||
@@ -68,10 +74,18 @@ static bool totp_plugin_state_init(PluginState* const plugin_state) {
|
|||||||
if(totp_crypto_verify_key(plugin_state)) {
|
if(totp_crypto_verify_key(plugin_state)) {
|
||||||
totp_scene_director_activate_scene(plugin_state, TotpSceneGenerateToken, NULL);
|
totp_scene_director_activate_scene(plugin_state, TotpSceneGenerateToken, NULL);
|
||||||
} else {
|
} else {
|
||||||
FURI_LOG_E(LOGGING_TAG, "Digital signature verification failed. Looks like conf file was created on another flipper and can't be used on any other");
|
FURI_LOG_E(
|
||||||
|
LOGGING_TAG,
|
||||||
|
"Digital signature verification failed. Looks like conf file was created on another flipper and can't be used on any other");
|
||||||
DialogMessage* message = dialog_message_alloc();
|
DialogMessage* message = dialog_message_alloc();
|
||||||
dialog_message_set_buttons(message, "Exit", NULL, NULL);
|
dialog_message_set_buttons(message, "Exit", NULL, NULL);
|
||||||
dialog_message_set_text(message, "Digital signature verification failed", SCREEN_WIDTH_CENTER, SCREEN_HEIGHT_CENTER, AlignCenter, AlignCenter);
|
dialog_message_set_text(
|
||||||
|
message,
|
||||||
|
"Digital signature verification failed",
|
||||||
|
SCREEN_WIDTH_CENTER,
|
||||||
|
SCREEN_HEIGHT_CENTER,
|
||||||
|
AlignCenter,
|
||||||
|
AlignCenter);
|
||||||
dialog_message_show(plugin_state->dialogs, message);
|
dialog_message_show(plugin_state->dialogs, message);
|
||||||
dialog_message_free(message);
|
dialog_message_free(message);
|
||||||
return false;
|
return false;
|
||||||
@@ -148,7 +162,9 @@ int32_t totp_app() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
processing = totp_scene_director_handle_event(&event, plugin_state_m);
|
processing = totp_scene_director_handle_event(&event, plugin_state_m);
|
||||||
} else if (plugin_state_m->pin_set && plugin_state_m->current_scene != TotpSceneAuthentication && furi_get_tick() - last_user_interaction_time > IDLE_TIMEOUT) {
|
} else if(
|
||||||
|
plugin_state_m->pin_set && plugin_state_m->current_scene != TotpSceneAuthentication &&
|
||||||
|
furi_get_tick() - last_user_interaction_time > IDLE_TIMEOUT) {
|
||||||
totp_scene_director_activate_scene(plugin_state_m, TotpSceneAuthentication, NULL);
|
totp_scene_director_activate_scene(plugin_state_m, TotpSceneAuthentication, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user