M0 step 7: Settings, About, Storage, first-boot setup

- lib/apps_model (host-tested): SettingsMenu (rows, readable values,
  choices, validation messages) and SetupWizard (names, Region
  confirmation, timezone; saves only when finished)
- AppManager: modal Apps that Home/Back can't leave (setup wizard)
- SettingsApp: all settings plus Storage (usage, erase SD behind a
  dialog) and About (version, node id, battery, memory, uptime) pages,
  replacing the temporary Diagnostics App
- SetupApp: first-boot wizard, opened modally until SetupDone
- Node id and default names derived from the MAC like Meshtastic
- Widget demo is now hidden (About, then w)
- lib_ldf_mode = deep+ so libraries see each other's headers

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
This commit is contained in:
2026-10-02 13:47:03 +02:00
co-authored by Claude Opus 5.5
parent 05c9d9cc56
commit 51698a8011
23 changed files with 1126 additions and 154 deletions
+8 -1
View File
@@ -36,7 +36,8 @@ void statusBar(Canvas& c, const StatusInfo& info) {
c.setTextDatum(top_left);
}
void list(Canvas& c, const ListModel& model, Rect area, const std::function<std::string(int)>& label) {
void list(Canvas& c, const ListModel& model, Rect area, const std::function<std::string(int)>& label,
const std::function<std::string(int)>& value) {
c.setFont(&fonts::body);
c.setTextDatum(top_left);
int rows = model.visibleRows();
@@ -48,6 +49,12 @@ void list(Canvas& c, const ListModel& model, Rect area, const std::function<std:
if (selected) c.fillRect(area.x, y, area.w - 4, kLineHeight, kSelection);
c.setTextColor(kText);
c.drawString(label(i).c_str(), area.x + 4, y + 1);
if (value) {
c.setTextColor(selected ? kText : kMuted);
c.setTextDatum(top_right);
c.drawString(value(i).c_str(), area.x + area.w - 8, y + 1);
c.setTextDatum(top_left);
}
}
// Scrollbar
if (model.count() > rows) {
+3 -2
View File
@@ -36,8 +36,9 @@ MeasureText bodyMeasure(Canvas& canvas);
void statusBar(Canvas& c, const StatusInfo& info);
// A selectable list; `label(i)` gives row i's text.
void list(Canvas& c, const ListModel& model, theme::Rect area, const std::function<std::string(int)>& label);
// A selectable list; `label(i)` gives row i's text and `value(i)`, if given, a right-aligned value.
void list(Canvas& c, const ListModel& model, theme::Rect area, const std::function<std::string(int)>& label,
const std::function<std::string(int)>& value = nullptr);
// Pre-wrapped lines starting at `firstLine`, with a scroll indicator when they don't all fit.
void textLines(Canvas& c, const std::vector<std::string>& lines, int firstLine, theme::Rect area);