mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-11-03 03:11:57 +00:00
feat(l2): settings put in one consistent order and look
Settings: Name and Radio first, then Bluetooth, WiFi and GPS side by side (a tap on each row opens its details: the pairing PIN, the networks, the GPS screen with a new Options tab for power saving and the fixed position), then Device, Mesh & data (Adverts & privacy now holds Auto-advert) and System. Time & units, Power as one group. Row symbols get a column of their own, value labels are as wide as their text, group headings are uppercase everywhere, the auto-add node types show only with "By type". SOS in three groups, WiFi with its switch, Map tools with the layers (Packet flow among them) under the trail. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -291,7 +291,7 @@ void UITask::openNode(int row) {
|
||||
|
||||
static lv_obj_t* s_nd_fav = nullptr;
|
||||
static void nodeFavText() {
|
||||
if (s_nd_fav) lv_label_set_text(s_nd_fav, s_node.fav ? UI_SYMBOL_STAR " Remove from favourites" : UI_SYMBOL_STAR " Add to favourites");
|
||||
if (s_nd_fav) lv_label_set_text(s_nd_fav, s_node.fav ? "Remove from favourites" : "Add to favourites"); // the star in its icon column
|
||||
}
|
||||
|
||||
static lv_obj_t* switchRow(lv_obj_t* parent, const char* text, const char* sub, uint8_t* pref); // below
|
||||
@@ -341,9 +341,9 @@ void UITask::buildNode() {
|
||||
s_nd_id = infoRow(_node_info, "ID", "");
|
||||
|
||||
if (pos || contact) {
|
||||
lv_obj_t* g = group(info, "More");
|
||||
lv_obj_t* g = group(info, "MORE");
|
||||
if (pos) actionRow(g, UI_SYMBOL_FLAG " Save as waypoint", onNodeAction, (void*)(uintptr_t)NODE_WAYPOINT);
|
||||
if (contact) s_nd_fav = actionRow(g, "", onNodeAction, (void*)(uintptr_t)NODE_FAV);
|
||||
if (contact) s_nd_fav = actionRow(g, UI_SYMBOL_STAR " ", onNodeAction, (void*)(uintptr_t)NODE_FAV);
|
||||
nodeFavText();
|
||||
if (contact && e.has_key) actionRow(g, UI_SYMBOL_TACK " Pin to Home", onNodeAction, (void*)(uintptr_t)NODE_PIN);
|
||||
ContactInfo* ci = (contact && e.has_key) ? the_mesh.lookupContactByPubKey(e.pub_key, PUB_KEY_SIZE) : nullptr;
|
||||
@@ -358,7 +358,7 @@ void UITask::buildNode() {
|
||||
// Where Settings > Privacy says "Allowed", what this contact may ask for.
|
||||
ContactInfo* ci = (contact && e.has_key) ? the_mesh.lookupContactByPubKey(e.pub_key, PUB_KEY_SIZE) : nullptr;
|
||||
if (ci && contactctl::telemetryPerContact(_prefs)) {
|
||||
lv_obj_t* g = group(info, "Can ask for");
|
||||
lv_obj_t* g = group(info, "CAN ASK FOR");
|
||||
static const struct { const char* text; const char* sub; uint8_t bit; } T[] = {
|
||||
{ "Status", "Battery; the two below need it", TELEM_PERM_BASE },
|
||||
{ "Location", nullptr, TELEM_PERM_LOCATION },
|
||||
@@ -524,7 +524,7 @@ void UITask::nodeAction(uint8_t action) {
|
||||
showToast(contactctl::share(e.pub_key) ? "Sent to nodes in range" : "No advert saved to send");
|
||||
break;
|
||||
case NODE_DELETE:
|
||||
if (!tapConfirmed(_node_delete_lbl, LV_SYMBOL_TRASH " Tap again to delete")) break;
|
||||
if (!tapConfirmed(_node_delete_lbl, "Tap again to delete")) break;
|
||||
if (the_mesh.deleteContactByKey(e.pub_key)) {
|
||||
_screen = SCR_NEARBY;
|
||||
buildNearby();
|
||||
|
||||
Reference in New Issue
Block a user