Skip to content

Commit

Permalink
Archive: Favorite .mag files (#110)
Browse files Browse the repository at this point in the history
* Impl mag file favoriting, add icon

* Revert API ver

* No weird formatting

---------

Co-authored-by: Willy-JL <[email protected]>
  • Loading branch information
zacharyweiss and Willy-JL authored Apr 30, 2024
1 parent a106b73 commit 0e8806c
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions applications/main/archive/helpers/archive_browser.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ static const char* tab_default_paths[] = {
};

static const char* known_ext[] = {
// clang-format off
[ArchiveFileTypeIButton] = ".ibtn",
[ArchiveFileTypeNFC] = ".nfc",
[ArchiveFileTypeSubGhz] = ".sub",
Expand All @@ -34,6 +35,7 @@ static const char* known_ext[] = {
[ArchiveFileTypeInfraredRemote] = ".txt",
[ArchiveFileTypeBadKb] = ".txt",
[ArchiveFileTypeWAV] = ".wav",
[ArchiveFileTypeMag] = ".mag",
[ArchiveFileTypeU2f] = "?",
[ArchiveFileTypeApplication] = ".fap",
[ArchiveFileTypeJS] = ".js",
Expand All @@ -43,6 +45,7 @@ static const char* known_ext[] = {
[ArchiveFileTypeFolder] = "?",
[ArchiveFileTypeUnknown] = "*",
[ArchiveFileTypeAppOrJs] = ".fap|.js",
// clang-format on
};

static const ArchiveFileTypeEnum known_type[] = {
Expand Down
1 change: 1 addition & 0 deletions applications/main/archive/helpers/archive_files.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ typedef enum {
ArchiveFileTypeInfraredRemote,
ArchiveFileTypeBadKb,
ArchiveFileTypeWAV,
ArchiveFileTypeMag,
ArchiveFileTypeU2f,
ArchiveFileTypeApplication,
ArchiveFileTypeJS,
Expand Down
2 changes: 2 additions & 0 deletions applications/main/archive/scenes/archive_scene_browser.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ const char* archive_get_flipper_app_name(ArchiveFileTypeEnum file_type) {
return "Bad KB";
case ArchiveFileTypeWAV:
return EXT_PATH("apps/Media/wav_player.fap");
case ArchiveFileTypeMag:
return EXT_PATH("apps/GPIO/magspoof.fap");
case ArchiveFileTypeU2f:
return "U2F";
case ArchiveFileTypeUpdateManifest:
Expand Down
1 change: 1 addition & 0 deletions applications/main/archive/views/archive_browser_view.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ static const Icon* ArchiveItemIcons[] = {
[ArchiveFileTypeInfraredRemote] = &I_ir_scope_10px,
[ArchiveFileTypeBadKb] = &I_badkb_10px,
[ArchiveFileTypeWAV] = &I_music_10px,
[ArchiveFileTypeMag] = &I_mag_card_10px,
[ArchiveFileTypeU2f] = &I_u2f_10px,
[ArchiveFileTypeApplication] = &I_Apps_10px,
[ArchiveFileTypeJS] = &I_js_script_10px,
Expand Down
Binary file added assets/icons/Archive/mag_card_10px.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions targets/f7/api_symbols.csv
Original file line number Diff line number Diff line change
Expand Up @@ -3940,6 +3940,7 @@ Variable,+,I_ir_scope_10px,Icon,
Variable,+,I_js_script_10px,Icon,
Variable,+,I_keyboard_10px,Icon,
Variable,+,I_loading_10px,Icon,
Variable,+,I_mag_card_10px,Icon,
Variable,+,I_max_24x23,Icon,
Variable,+,I_max_hover_24x23,Icon,
Variable,+,I_menu_text_20x5,Icon,
Expand Down

0 comments on commit 0e8806c

Please sign in to comment.