MX 9 miesięcy temu
rodzic
commit
dbde62d8f5

+ 1 - 1
application.fam

@@ -7,7 +7,7 @@ App(
     requires=["gui", "cli", "dialogs", "storage", "input", "notification", "bt"],
     stack_size=2 * 1024,
     order=20,
-    fap_version="5.171",
+    fap_version="5.173",
     fap_author="Alexander Kopachov (@akopachov)",
     fap_description="Software-based TOTP/HOTP authenticator for Flipper Zero device",
     fap_weburl="https://github.com/akopachov/flipper-zero_authenticator",

+ 2 - 0
cli/cli_helpers.h

@@ -27,6 +27,8 @@ extern "C" {
 #define TOTP_CLI_PRINTF_INFO(format, ...) \
     TOTP_CLI_PRINTF_COLORFUL(TOTP_CLI_COLOR_INFO, format, ##__VA_ARGS__)
 
+#define TOTP_CLI_NL() TOTP_CLI_PRINTF("\r\n")
+
 #define TOTP_CLI_LOCK_UI(plugin_state)                                  \
     Scene __previous_scene = plugin_state->current_scene;               \
     totp_scene_director_activate_scene(plugin_state, TotpSceneStandby); \

+ 2 - 2
cli/cli_shared_methods.c

@@ -44,7 +44,7 @@ bool totp_cli_read_line(PipeSide* pipe, FuriString* out_str, bool mask_user_inpu
             pipe_receive(pipe, &c2, 1);
             pipe_receive(pipe, &c2, 1);
         } else if(c == CliKeyETX) {
-            printf("\r\n");
+            TOTP_CLI_NL();
             return false;
         } else if(
             (c >= '0' && c <= '9') || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') ||
@@ -63,7 +63,7 @@ bool totp_cli_read_line(PipeSide* pipe, FuriString* out_str, bool mask_user_inpu
                 furi_string_left(out_str, out_str_size - 1);
             }
         } else if(c == CliKeyCR) {
-            printf("\r\n");
+            TOTP_CLI_NL();
             break;
         }
     }

+ 2 - 2
cli/plugins/automation/automation.c

@@ -131,7 +131,7 @@ static void handle(PluginState* plugin_state, FuriString* args, PipeSide* pipe)
                 print_initial_delay(
                     plugin_state->automation_initial_delay, TOTP_CLI_COLOR_SUCCESS);
                 TOTP_CLI_PRINTF_SUCCESS(" sec.]");
-                printf("\r\n");
+                TOTP_CLI_NL();
             } else {
                 TOTP_CLI_PRINT_ERROR_UPDATING_CONFIG_FILE();
             }
@@ -154,7 +154,7 @@ static void handle(PluginState* plugin_state, FuriString* args, PipeSide* pipe)
             TOTP_CLI_PRINTF_INFO(" [");
             print_initial_delay(plugin_state->automation_initial_delay, TOTP_CLI_COLOR_INFO);
             TOTP_CLI_PRINTF_INFO(" sec.]");
-            printf("\r\n");
+            TOTP_CLI_NL();
         }
     } while(false);
 

+ 2 - 2
cli/plugins/export/export.c

@@ -90,7 +90,7 @@ static void handle(PluginState* plugin_state, FuriString* args, PipeSide* pipe)
 
     size_t original_index = totp_token_info_iterator_get_current_token_index(iterator_context);
 
-    printf("\r\n");
+    TOTP_CLI_NL();
     TOTP_CLI_PRINTF("# --- EXPORT LIST BEGIN ---\r\n");
 
     for(size_t i = 0; i < total_count; i++) {
@@ -116,7 +116,7 @@ static void handle(PluginState* plugin_state, FuriString* args, PipeSide* pipe)
         } else {
             TOTP_CLI_PRINTF("&period=%" PRIu8, token_info->duration);
         }
-        printf("\r\n");
+        TOTP_CLI_NL();
     }
 
     TOTP_CLI_PRINTF("# --- EXPORT LIST END ---\r\n\r\n");

+ 2 - 2
cli/plugins/notification/notification.c

@@ -67,7 +67,7 @@ static void handle(PluginState* plugin_state, FuriString* args, PipeSide* pipe)
             if(totp_config_file_update_notification_method(plugin_state)) {
                 TOTP_CLI_PRINTF_SUCCESS("Notification method is set to ");
                 totp_cli_command_notification_print_method(new_method, TOTP_CLI_COLOR_SUCCESS);
-                printf("\r\n");
+                TOTP_CLI_NL();
             } else {
                 TOTP_CLI_PRINT_ERROR_UPDATING_CONFIG_FILE();
             }
@@ -77,7 +77,7 @@ static void handle(PluginState* plugin_state, FuriString* args, PipeSide* pipe)
             TOTP_CLI_PRINTF_INFO("Current notification method is ");
             totp_cli_command_notification_print_method(
                 plugin_state->notification_method, TOTP_CLI_COLOR_INFO);
-            printf("\r\n");
+            TOTP_CLI_NL();
         }
     } while(false);
 

+ 1 - 1
cli/plugins/pin/pin.c

@@ -65,7 +65,7 @@ static bool totp_cli_read_pin(PipeSide* pipe, uint8_t* pin, uint8_t* pin_length)
                 TOTP_CLI_DELETE_LAST_CHAR();
             }
         } else if(c == CliKeyCR) {
-            printf("\r\n");
+            TOTP_CLI_NL();
             break;
         }
     }

+ 1 - 1
version.h

@@ -2,4 +2,4 @@
 
 #define TOTP_APP_VERSION_MAJOR (5)
 #define TOTP_APP_VERSION_MINOR (17)
-#define TOTP_APP_VERSION_PATCH (1)
+#define TOTP_APP_VERSION_PATCH (3)