Преглед изворни кода

Well... CLI was nice idea, but I can't make it work. Maybe next time

alex.kopachov пре 3 година
родитељ
комит
5f8e55e3bc
2 измењених фајлова са 0 додато и 41 уклоњено
  1. 0 9
      application.fam
  2. 0 32
      totp_app_cli.c

+ 0 - 9
application.fam

@@ -12,17 +12,8 @@ App(
         "input", 
         "notification"
     ],
-    provides=["totp_start"],
     stack_size=2 * 1024,
     order=20,
     fap_category="Misc",
     fap_icon="totp_10px.png"
 )
-
-App(
-    appid="totp_start",
-    apptype=FlipperAppType.STARTUP,
-    entry_point="totp_on_system_start",
-    requires=["totp"],
-    order=30,
-)

+ 0 - 32
totp_app_cli.c

@@ -1,32 +0,0 @@
-#include <furi.h>
-#include <cli/cli.h>
-#include <storage/storage.h>
-
-void totp_cli_print_usage() {
-    printf("Usage:\r\n");
-    printf("totp <cmd> <args>\r\n");
-    printf("Cmd list:\r\n");
-    printf("\tadd <secret:string> <name:string>\t - Add new TOTP secret\r\n");
-    printf("\tremove <name:string>\t - Remove TOTP token\r\n");
-    printf("\reset\t - Reset app to default (reset PIN and removes all tokens)\r\n");
-};
-
-static void totp_cli(Cli* cli, FuriString* args, void* context) {
-    UNUSED(cli);
-    UNUSED(args);
-    UNUSED(context);
-    totp_cli_print_usage();
-    // TODO: implement add\remove\reset
-}
-
-void totp_on_system_start() {
-#ifdef SRV_CLI
-    Cli* cli = furi_record_open(RECORD_CLI);
-
-    cli_add_command(cli, "totp", CliCommandFlagDefault, totp_cli, NULL);
-
-    furi_record_close(RECORD_CLI);
-#else
-    UNUSED(totp_cli);
-#endif
-}