mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
GUI: Some text and UI fixes
This commit is contained in:
Submodule applications/external updated: 0a277a49c3...f232070e06
@@ -51,7 +51,10 @@ void infrared_scene_start_on_enter(void* context) {
|
||||
infrared_scene_start_submenu_callback,
|
||||
infrared,
|
||||
!infrared->app_state.is_debug_enabled,
|
||||
"Enable\nDebug!");
|
||||
"Enable\n"
|
||||
"Settings >\n"
|
||||
"System >\n"
|
||||
"Debug");
|
||||
submenu_add_lockable_item(
|
||||
submenu,
|
||||
"Debug RX",
|
||||
@@ -59,7 +62,10 @@ void infrared_scene_start_on_enter(void* context) {
|
||||
infrared_scene_start_submenu_callback,
|
||||
infrared,
|
||||
!infrared->app_state.is_debug_enabled,
|
||||
"Enable\nDebug!");
|
||||
"Enable\n"
|
||||
"Settings >\n"
|
||||
"System >\n"
|
||||
"Debug");
|
||||
|
||||
const uint32_t submenu_index =
|
||||
scene_manager_get_scene_state(scene_manager, InfraredSceneStart);
|
||||
|
||||
@@ -45,7 +45,10 @@ void lfrfid_scene_extra_actions_on_enter(void* context) {
|
||||
lfrfid_scene_extra_actions_submenu_callback,
|
||||
app,
|
||||
!furi_hal_rtc_is_flag_set(FuriHalRtcFlagDebug),
|
||||
"Enable\nDebug!");
|
||||
"Enable\n"
|
||||
"Settings >\n"
|
||||
"System >\n"
|
||||
"Debug");
|
||||
submenu_add_lockable_item(
|
||||
submenu,
|
||||
"Emulate RAW RFID data",
|
||||
@@ -53,7 +56,10 @@ void lfrfid_scene_extra_actions_on_enter(void* context) {
|
||||
lfrfid_scene_extra_actions_submenu_callback,
|
||||
app,
|
||||
!furi_hal_rtc_is_flag_set(FuriHalRtcFlagDebug),
|
||||
"Enable\nDebug!");
|
||||
"Enable\n"
|
||||
"Settings >\n"
|
||||
"System >\n"
|
||||
"Debug");
|
||||
|
||||
submenu_set_selected_item(
|
||||
submenu, scene_manager_get_scene_state(app->scene_manager, LfRfidSceneExtraActions));
|
||||
|
||||
@@ -351,17 +351,19 @@ MomentumApp* momentum_app_alloc() {
|
||||
app->dolphin_angry = stats.butthurt;
|
||||
furi_record_close(RECORD_DOLPHIN);
|
||||
|
||||
app->version_tag = furi_string_alloc_printf("%s ", version_get_version(NULL));
|
||||
if(furi_string_start_with(app->version_tag, "mntm-dev")) {
|
||||
furi_string_set(app->version_tag, "MNTM-DEV ");
|
||||
const char* sha = version_get_githash(NULL);
|
||||
const uint8_t sha_len = strlen(sha) <= 7 ? strlen(sha) : 7;
|
||||
for(size_t i = 0; i < sha_len; ++i) {
|
||||
furi_string_push_back(app->version_tag, toupper(sha[i]));
|
||||
app->version_tag = furi_string_alloc_set(version_get_version(NULL));
|
||||
size_t sha_pos = furi_string_search_char(app->version_tag, '-', strlen("mntm-"));
|
||||
if(sha_pos != FURI_STRING_FAILURE) {
|
||||
// Change second "-" to " " and make uppercase
|
||||
furi_string_replace_at(app->version_tag, sha_pos, 1, " ");
|
||||
for(size_t i = 0; i < furi_string_size(app->version_tag); ++i) {
|
||||
furi_string_set_char(
|
||||
app->version_tag, i, toupper(furi_string_get_char(app->version_tag, i)));
|
||||
}
|
||||
} else {
|
||||
// Make uppercase and add build date after space
|
||||
furi_string_replace(app->version_tag, "mntm", "MNTM");
|
||||
furi_string_cat(app->version_tag, version_get_builddate(NULL));
|
||||
furi_string_cat_printf(app->version_tag, " %s", version_get_builddate(NULL));
|
||||
}
|
||||
|
||||
return app;
|
||||
|
||||
@@ -103,7 +103,7 @@ bool momentum_app_scene_protocols_on_event(void* context, SceneManagerEvent even
|
||||
bool change = !value; // Change without confirm if going from ON to OFF
|
||||
if(value) {
|
||||
DialogMessage* msg = dialog_message_alloc();
|
||||
dialog_message_set_header(msg, "Are you sure?", 64, 0, AlignCenter, AlignTop);
|
||||
dialog_message_set_header(msg, "Are you sure?", 64, 4, AlignCenter, AlignTop);
|
||||
dialog_message_set_buttons(msg, "No", NULL, "Yes");
|
||||
dialog_message_set_text(
|
||||
msg,
|
||||
@@ -116,7 +116,7 @@ bool momentum_app_scene_protocols_on_event(void* context, SceneManagerEvent even
|
||||
"Use at own risk, may\n"
|
||||
"damage Flipper",
|
||||
64,
|
||||
32,
|
||||
36,
|
||||
AlignCenter,
|
||||
AlignCenter);
|
||||
if(dialog_message_show(app->dialogs, msg) == DialogMessageButtonRight) {
|
||||
|
||||
@@ -43,7 +43,10 @@ void nfc_scene_start_on_enter(void* context) {
|
||||
nfc_scene_start_submenu_callback,
|
||||
nfc,
|
||||
!furi_hal_rtc_is_flag_set(FuriHalRtcFlagDebug),
|
||||
"Enable\nDebug!");
|
||||
"Enable\n"
|
||||
"Settings >\n"
|
||||
"System >\n"
|
||||
"Debug");
|
||||
|
||||
submenu_set_selected_item(
|
||||
submenu, scene_manager_get_scene_state(nfc->scene_manager, NfcSceneStart));
|
||||
|
||||
@@ -215,7 +215,12 @@ void subghz_scene_radio_settings_on_enter(void* context) {
|
||||
variable_item_set_current_value_index(item, value_index);
|
||||
variable_item_set_current_value_text(item, debug_pin_text[value_index]);
|
||||
variable_item_set_locked(
|
||||
item, !furi_hal_rtc_is_flag_set(FuriHalRtcFlagDebug), "Enable\nDebug!");
|
||||
item,
|
||||
!furi_hal_rtc_is_flag_set(FuriHalRtcFlagDebug),
|
||||
"Enable\n"
|
||||
"Settings >\n"
|
||||
"System >\n"
|
||||
"Debug");
|
||||
|
||||
view_dispatcher_switch_to_view(subghz->view_dispatcher, SubGhzViewIdVariableItemList);
|
||||
}
|
||||
|
||||
@@ -171,10 +171,15 @@ static DialogMessageButton about_screen_fw_version(DialogsApp* dialogs, DialogMe
|
||||
} else {
|
||||
uint16_t api_major, api_minor;
|
||||
furi_hal_info_get_api_version(&api_major, &api_minor);
|
||||
furi_string_set(buffer, version_get_version(ver));
|
||||
size_t sha_pos = furi_string_search_char(buffer, '-', strlen("mntm-"));
|
||||
if(sha_pos != FURI_STRING_FAILURE) {
|
||||
// Strip commit sha if present (non-release)
|
||||
furi_string_left(buffer, sha_pos);
|
||||
}
|
||||
furi_string_cat_printf(
|
||||
buffer,
|
||||
"%s %s\n%s F%d:%d.%d %s\nhttps://momentum-fw.dev/",
|
||||
version_get_version(ver),
|
||||
" %s\n%s F%d:%d.%d %s\nmomentum-fw.dev",
|
||||
version_get_builddate(ver),
|
||||
version_get_githash(ver),
|
||||
version_get_target(ver),
|
||||
|
||||
Reference in New Issue
Block a user