From a5bb1ead68520cc0c751f8fd73ef8c205370af98 Mon Sep 17 00:00:00 2001 From: Astra <93453568+Astrrra@users.noreply.github.com> Date: Wed, 20 Mar 2024 16:44:48 +0200 Subject: [PATCH] NFC wording fixes (#3512) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * NFC wording fixes * Fix filename Co-authored-by: hedger Co-authored-by: あく --- .../mf_ultralight/mf_ultralight.c | 2 +- .../mf_ultralight/mf_ultralight_render.c | 6 +- .../main/nfc/scenes/nfc_scene_config.h | 3 +- .../main/nfc/scenes/nfc_scene_detect.c | 2 +- ...nfc_scene_mf_classic_keys_warn_duplicate.c | 2 +- .../nfc_scene_mf_classic_mfkey_complete.c | 2 +- .../nfc_scene_mf_classic_update_initial.c | 8 ++- ...ene_mf_classic_update_initial_wrong_card.c | 58 +++++++++++++++++++ .../nfc_scene_mf_classic_write_initial.c | 5 +- ...ene_mf_classic_write_initial_wrong_card.c} | 14 ++--- .../nfc_scene_mf_ultralight_unlock_warn.c | 10 ++-- .../main/nfc/scenes/nfc_scene_slix_unlock.c | 2 +- 12 files changed, 90 insertions(+), 24 deletions(-) create mode 100644 applications/main/nfc/scenes/nfc_scene_mf_classic_update_initial_wrong_card.c rename applications/main/nfc/scenes/{nfc_scene_mf_classic_wrong_card.c => nfc_scene_mf_classic_write_initial_wrong_card.c} (69%) diff --git a/applications/main/nfc/helpers/protocol_support/mf_ultralight/mf_ultralight.c b/applications/main/nfc/helpers/protocol_support/mf_ultralight/mf_ultralight.c index eb6911df74..c2aaac5bee 100644 --- a/applications/main/nfc/helpers/protocol_support/mf_ultralight/mf_ultralight.c +++ b/applications/main/nfc/helpers/protocol_support/mf_ultralight/mf_ultralight.c @@ -169,7 +169,7 @@ static void nfc_scene_read_setup_view(NfcApp* instance) { popup_set_icon(instance->popup, 0, 8, &I_NFC_manual_60x50); popup_set_header(instance->popup, "Unlocking", 97, 15, AlignCenter, AlignTop); popup_set_text( - instance->popup, "Apply card to\nFlipper's back", 97, 27, AlignCenter, AlignTop); + instance->popup, "Hold card next\nto Flipper's back", 94, 27, AlignCenter, AlignTop); } else { popup_set_header(instance->popup, "Don't move", 85, 27, AlignCenter, AlignTop); popup_set_icon(instance->popup, 12, 20, &A_Loading_24); diff --git a/applications/main/nfc/helpers/protocol_support/mf_ultralight/mf_ultralight_render.c b/applications/main/nfc/helpers/protocol_support/mf_ultralight/mf_ultralight_render.c index 1bc508adce..c4ad67ff8b 100644 --- a/applications/main/nfc/helpers/protocol_support/mf_ultralight/mf_ultralight_render.c +++ b/applications/main/nfc/helpers/protocol_support/mf_ultralight/mf_ultralight_render.c @@ -11,7 +11,11 @@ static void nfc_render_mf_ultralight_pages_count(const MfUltralightData* data, F void nfc_render_mf_ultralight_pwd_pack(const MfUltralightData* data, FuriString* str) { bool all_pages = mf_ultralight_is_all_data_read(data); - furi_string_cat_printf(str, "\e#%s pages unlocked!", all_pages ? "All" : "Not all"); + if(all_pages) { + furi_string_cat_printf(str, "\e#All Pages Are Unlocked!"); + } else { + furi_string_cat_printf(str, "\e#Some Pages Are Locked!"); + } MfUltralightConfigPages* config; mf_ultralight_get_config_page(data, &config); diff --git a/applications/main/nfc/scenes/nfc_scene_config.h b/applications/main/nfc/scenes/nfc_scene_config.h index 94d845fa36..e522cd059a 100644 --- a/applications/main/nfc/scenes/nfc_scene_config.h +++ b/applications/main/nfc/scenes/nfc_scene_config.h @@ -45,10 +45,11 @@ ADD_SCENE(nfc, mf_classic_mfkey_nonces_info, MfClassicMfkeyNoncesInfo) ADD_SCENE(nfc, mf_classic_mfkey_complete, MfClassicMfkeyComplete) ADD_SCENE(nfc, mf_classic_update_initial, MfClassicUpdateInitial) ADD_SCENE(nfc, mf_classic_update_initial_success, MfClassicUpdateInitialSuccess) +ADD_SCENE(nfc, mf_classic_update_initial_wrong_card, MfClassicUpdateInitialWrongCard) ADD_SCENE(nfc, mf_classic_write_initial, MfClassicWriteInitial) ADD_SCENE(nfc, mf_classic_write_initial_success, MfClassicWriteInitialSuccess) ADD_SCENE(nfc, mf_classic_write_initial_fail, MfClassicWriteInitialFail) -ADD_SCENE(nfc, mf_classic_wrong_card, MfClassicWrongCard) +ADD_SCENE(nfc, mf_classic_write_initial_wrong_card, MfClassicWriteInitialWrongCard) ADD_SCENE(nfc, mf_classic_keys, MfClassicKeys) ADD_SCENE(nfc, mf_classic_keys_list, MfClassicKeysList) diff --git a/applications/main/nfc/scenes/nfc_scene_detect.c b/applications/main/nfc/scenes/nfc_scene_detect.c index 34c552aba5..3ef153657d 100644 --- a/applications/main/nfc/scenes/nfc_scene_detect.c +++ b/applications/main/nfc/scenes/nfc_scene_detect.c @@ -19,7 +19,7 @@ void nfc_scene_detect_on_enter(void* context) { popup_reset(instance->popup); popup_set_header(instance->popup, "Reading", 97, 15, AlignCenter, AlignTop); popup_set_text( - instance->popup, "Apply card to\nFlipper's back", 97, 27, AlignCenter, AlignTop); + instance->popup, "Hold card next\nto Flipper's back", 94, 27, AlignCenter, AlignTop); popup_set_icon(instance->popup, 0, 8, &I_NFC_manual_60x50); view_dispatcher_switch_to_view(instance->view_dispatcher, NfcViewPopup); diff --git a/applications/main/nfc/scenes/nfc_scene_mf_classic_keys_warn_duplicate.c b/applications/main/nfc/scenes/nfc_scene_mf_classic_keys_warn_duplicate.c index c3fb92bee0..675463ec96 100644 --- a/applications/main/nfc/scenes/nfc_scene_mf_classic_keys_warn_duplicate.c +++ b/applications/main/nfc/scenes/nfc_scene_mf_classic_keys_warn_duplicate.c @@ -12,7 +12,7 @@ void nfc_scene_mf_classic_keys_warn_duplicate_on_enter(void* context) { // Setup view Popup* popup = instance->popup; popup_set_icon(popup, 83, 22, &I_WarningDolphinFlip_45x42); - popup_set_header(popup, "Key already exists!", 64, 3, AlignCenter, AlignTop); + popup_set_header(popup, "Key Already Exists!", 64, 3, AlignCenter, AlignTop); popup_set_text( popup, "Please enter a\n" diff --git a/applications/main/nfc/scenes/nfc_scene_mf_classic_mfkey_complete.c b/applications/main/nfc/scenes/nfc_scene_mf_classic_mfkey_complete.c index eb0aa7c3ae..d5033789a1 100644 --- a/applications/main/nfc/scenes/nfc_scene_mf_classic_mfkey_complete.c +++ b/applications/main/nfc/scenes/nfc_scene_mf_classic_mfkey_complete.c @@ -14,7 +14,7 @@ void nfc_scene_mf_classic_mfkey_complete_on_enter(void* context) { NfcApp* instance = context; widget_add_string_element( - instance->widget, 64, 0, AlignCenter, AlignTop, FontPrimary, "Complete!"); + instance->widget, 64, 0, AlignCenter, AlignTop, FontPrimary, "Completed!"); widget_add_string_multiline_element( instance->widget, 64, diff --git a/applications/main/nfc/scenes/nfc_scene_mf_classic_update_initial.c b/applications/main/nfc/scenes/nfc_scene_mf_classic_update_initial.c index 961afdf531..7c76260b4f 100644 --- a/applications/main/nfc/scenes/nfc_scene_mf_classic_update_initial.c +++ b/applications/main/nfc/scenes/nfc_scene_mf_classic_update_initial.c @@ -61,7 +61,7 @@ static void nfc_scene_mf_classic_update_initial_setup_view(NfcApp* instance) { if(state == NfcSceneMfClassicUpdateInitialStateCardSearch) { popup_set_text( - instance->popup, "Apply the initial\ncard only", 128, 32, AlignRight, AlignCenter); + instance->popup, "Use the source\ncard only", 128, 32, AlignRight, AlignCenter); popup_set_icon(instance->popup, 0, 8, &I_NFC_manual_60x50); } else { popup_set_header(popup, "Updating\nDon't move...", 52, 32, AlignLeft, AlignCenter); @@ -111,14 +111,16 @@ bool nfc_scene_mf_classic_update_initial_on_event(void* context, SceneManagerEve nfc_scene_mf_classic_update_initial_setup_view(instance); consumed = true; } else if(event.event == NfcCustomEventWrongCard) { - scene_manager_next_scene(instance->scene_manager, NfcSceneMfClassicWrongCard); + scene_manager_next_scene( + instance->scene_manager, NfcSceneMfClassicUpdateInitialWrongCard); consumed = true; } else if(event.event == NfcCustomEventWorkerExit) { if(nfc_save_shadow_file(instance)) { scene_manager_next_scene( instance->scene_manager, NfcSceneMfClassicUpdateInitialSuccess); } else { - scene_manager_next_scene(instance->scene_manager, NfcSceneMfClassicWrongCard); + scene_manager_next_scene( + instance->scene_manager, NfcSceneMfClassicUpdateInitialWrongCard); consumed = true; } } diff --git a/applications/main/nfc/scenes/nfc_scene_mf_classic_update_initial_wrong_card.c b/applications/main/nfc/scenes/nfc_scene_mf_classic_update_initial_wrong_card.c new file mode 100644 index 0000000000..c2c36c74fa --- /dev/null +++ b/applications/main/nfc/scenes/nfc_scene_mf_classic_update_initial_wrong_card.c @@ -0,0 +1,58 @@ +#include "../nfc_app_i.h" + +void nfc_scene_mf_classic_update_initial_wrong_card_widget_callback( + GuiButtonType result, + InputType type, + void* context) { + NfcApp* instance = context; + if(type == InputTypeShort) { + view_dispatcher_send_custom_event(instance->view_dispatcher, result); + } +} + +void nfc_scene_mf_classic_update_initial_wrong_card_on_enter(void* context) { + NfcApp* instance = context; + Widget* widget = instance->widget; + + notification_message(instance->notifications, &sequence_error); + + widget_add_icon_element(widget, 83, 22, &I_WarningDolphinFlip_45x42); + widget_add_string_element(widget, 3, 4, AlignLeft, AlignTop, FontPrimary, "Wrong Card!"); + widget_add_string_multiline_element( + widget, + 4, + 17, + AlignLeft, + AlignTop, + FontSecondary, + "Data management\nis only possible\nwith source card"); + widget_add_button_element( + widget, + GuiButtonTypeLeft, + "Retry", + nfc_scene_mf_classic_update_initial_wrong_card_widget_callback, + instance); + + // Setup and start worker + view_dispatcher_switch_to_view(instance->view_dispatcher, NfcViewWidget); +} + +bool nfc_scene_mf_classic_update_initial_wrong_card_on_event( + void* context, + SceneManagerEvent event) { + NfcApp* instance = context; + bool consumed = false; + + if(event.type == SceneManagerEventTypeCustom) { + if(event.event == GuiButtonTypeLeft) { + consumed = scene_manager_previous_scene(instance->scene_manager); + } + } + return consumed; +} + +void nfc_scene_mf_classic_update_initial_wrong_card_on_exit(void* context) { + NfcApp* instance = context; + + widget_reset(instance->widget); +} \ No newline at end of file diff --git a/applications/main/nfc/scenes/nfc_scene_mf_classic_write_initial.c b/applications/main/nfc/scenes/nfc_scene_mf_classic_write_initial.c index da576a276c..12e7ba1ecd 100644 --- a/applications/main/nfc/scenes/nfc_scene_mf_classic_write_initial.c +++ b/applications/main/nfc/scenes/nfc_scene_mf_classic_write_initial.c @@ -67,7 +67,7 @@ static void nfc_scene_mf_classic_write_initial_setup_view(NfcApp* instance) { if(state == NfcSceneMfClassicWriteInitialStateCardSearch) { popup_set_header(instance->popup, "Writing", 95, 20, AlignCenter, AlignCenter); popup_set_text( - instance->popup, "Apply the initial\ncard only", 95, 38, AlignCenter, AlignCenter); + instance->popup, "Use the source\ncard only", 95, 38, AlignCenter, AlignCenter); popup_set_icon(instance->popup, 0, 8, &I_NFC_manual_60x50); } else { popup_set_header(popup, "Writing\nDon't move...", 52, 32, AlignLeft, AlignCenter); @@ -115,7 +115,8 @@ bool nfc_scene_mf_classic_write_initial_on_event(void* context, SceneManagerEven nfc_scene_mf_classic_write_initial_setup_view(instance); consumed = true; } else if(event.event == NfcCustomEventWrongCard) { - scene_manager_next_scene(instance->scene_manager, NfcSceneMfClassicWrongCard); + scene_manager_next_scene( + instance->scene_manager, NfcSceneMfClassicWriteInitialWrongCard); consumed = true; } else if(event.event == NfcCustomEventPollerSuccess) { scene_manager_next_scene( diff --git a/applications/main/nfc/scenes/nfc_scene_mf_classic_wrong_card.c b/applications/main/nfc/scenes/nfc_scene_mf_classic_write_initial_wrong_card.c similarity index 69% rename from applications/main/nfc/scenes/nfc_scene_mf_classic_wrong_card.c rename to applications/main/nfc/scenes/nfc_scene_mf_classic_write_initial_wrong_card.c index a879985bc8..3f92ebfd3b 100644 --- a/applications/main/nfc/scenes/nfc_scene_mf_classic_wrong_card.c +++ b/applications/main/nfc/scenes/nfc_scene_mf_classic_write_initial_wrong_card.c @@ -1,6 +1,6 @@ #include "../nfc_app_i.h" -void nfc_scene_mf_classic_wrong_card_widget_callback( +void nfc_scene_mf_classic_write_initial_wrong_card_widget_callback( GuiButtonType result, InputType type, void* context) { @@ -10,7 +10,7 @@ void nfc_scene_mf_classic_wrong_card_widget_callback( } } -void nfc_scene_mf_classic_wrong_card_on_enter(void* context) { +void nfc_scene_mf_classic_write_initial_wrong_card_on_enter(void* context) { NfcApp* instance = context; Widget* widget = instance->widget; @@ -18,7 +18,7 @@ void nfc_scene_mf_classic_wrong_card_on_enter(void* context) { widget_add_icon_element(widget, 83, 22, &I_WarningDolphinFlip_45x42); widget_add_string_element( - widget, 3, 4, AlignLeft, AlignTop, FontPrimary, "This is wrong card"); + widget, 3, 4, AlignLeft, AlignTop, FontPrimary, "Use The Source Card!"); widget_add_string_multiline_element( widget, 4, @@ -26,19 +26,19 @@ void nfc_scene_mf_classic_wrong_card_on_enter(void* context) { AlignLeft, AlignTop, FontSecondary, - "Data management\nis only possible\nwith initial card"); + "Go to NFC Magic\napp if you want to\nwrite blanks"); widget_add_button_element( widget, GuiButtonTypeLeft, "Retry", - nfc_scene_mf_classic_wrong_card_widget_callback, + nfc_scene_mf_classic_write_initial_wrong_card_widget_callback, instance); // Setup and start worker view_dispatcher_switch_to_view(instance->view_dispatcher, NfcViewWidget); } -bool nfc_scene_mf_classic_wrong_card_on_event(void* context, SceneManagerEvent event) { +bool nfc_scene_mf_classic_write_initial_wrong_card_on_event(void* context, SceneManagerEvent event) { NfcApp* instance = context; bool consumed = false; @@ -50,7 +50,7 @@ bool nfc_scene_mf_classic_wrong_card_on_event(void* context, SceneManagerEvent e return consumed; } -void nfc_scene_mf_classic_wrong_card_on_exit(void* context) { +void nfc_scene_mf_classic_write_initial_wrong_card_on_exit(void* context) { NfcApp* instance = context; widget_reset(instance->widget); diff --git a/applications/main/nfc/scenes/nfc_scene_mf_ultralight_unlock_warn.c b/applications/main/nfc/scenes/nfc_scene_mf_ultralight_unlock_warn.c index db5fd945fa..4df8a62899 100644 --- a/applications/main/nfc/scenes/nfc_scene_mf_ultralight_unlock_warn.c +++ b/applications/main/nfc/scenes/nfc_scene_mf_ultralight_unlock_warn.c @@ -22,14 +22,14 @@ void nfc_scene_mf_ultralight_unlock_warn_on_enter(void* context) { for(size_t i = 0; i < sizeof(nfc->mf_ul_auth->password.data); i++) { furi_string_cat_printf(password_str, "%02X ", nfc->mf_ul_auth->password.data[i]); } - furi_string_cat_str(password_str, "?\nCaution, a wrong password\ncan block the card!"); + furi_string_cat_str(password_str, "\nWarning: incorrect password\nwill block the card!"); nfc_text_store_set(nfc, furi_string_get_cstr(password_str)); furi_string_free(password_str); - const char* message = (type == MfUltralightAuthTypeReader) ? "Password captured!" : - "Risky function!"; + const char* message = (type == MfUltralightAuthTypeReader) ? "Password Captured!" : + "Risky Action!"; dialog_ex_set_header(dialog_ex, message, 64, 0, AlignCenter, AlignTop); - dialog_ex_set_text(dialog_ex, nfc->text_store, 64, 12, AlignCenter, AlignTop); + dialog_ex_set_text(dialog_ex, nfc->text_store, 64, 10, AlignCenter, AlignTop); dialog_ex_set_left_button_text(dialog_ex, "Cancel"); dialog_ex_set_right_button_text(dialog_ex, "Continue"); @@ -37,7 +37,7 @@ void nfc_scene_mf_ultralight_unlock_warn_on_enter(void* context) { notification_message(nfc->notifications, &sequence_set_green_255); } } else { - dialog_ex_set_header(dialog_ex, "Risky function!", 64, 4, AlignCenter, AlignTop); + dialog_ex_set_header(dialog_ex, "Risky action!", 64, 4, AlignCenter, AlignTop); dialog_ex_set_text( dialog_ex, "Wrong password\ncan block your\ncard.", 4, 18, AlignLeft, AlignTop); dialog_ex_set_icon(dialog_ex, 83, 22, &I_WarningDolphinFlip_45x42); diff --git a/applications/main/nfc/scenes/nfc_scene_slix_unlock.c b/applications/main/nfc/scenes/nfc_scene_slix_unlock.c index b01876e068..ae725ce679 100644 --- a/applications/main/nfc/scenes/nfc_scene_slix_unlock.c +++ b/applications/main/nfc/scenes/nfc_scene_slix_unlock.c @@ -32,7 +32,7 @@ void nfc_scene_slix_unlock_on_enter(void* context) { popup_set_icon(instance->popup, 0, 8, &I_NFC_manual_60x50); popup_set_header(instance->popup, "Unlocking", 97, 15, AlignCenter, AlignTop); popup_set_text( - instance->popup, "Apply card to\nFlipper's back", 97, 27, AlignCenter, AlignTop); + instance->popup, "Hold card next\nto Flipper's back", 94, 27, AlignCenter, AlignTop); view_dispatcher_switch_to_view(instance->view_dispatcher, NfcViewPopup); instance->poller = nfc_poller_alloc(instance->nfc, NfcProtocolSlix);