Warning screen, smarter license re-validation, version reporting

Warning screen
- New reusable WarningPage (word-wrapped message, ENTER acknowledges and
  continues to the screen you were about to enter).
- First use: pressing Play while the selected audio is still downloading.
  Dynamic Audio requires every file; a fixed track requires its own file.

License re-validation
- No longer re-verifies on every Home render. Checks now run only when the
  email/license key is entered or changed, on the manual option, at startup
  when already due, and hourly while valid.
- Invalid + unchanged credentials are never re-checked (persisted pair).
- Valid re-checks at most once per hour, anchored on a DB timestamp so an
  overdue check runs immediately after a power cycle.
- New system_kv keys track the checked pair, outcome, and last-check time.
- Added a System Settings row "Manually Validate License Key OK|Invalid"
  (OK green, Invalid red, label white) that runs a check immediately.

Portal / local integration
- License validation request now sends the app version as `appVersion`.
- The entered license key is mirrored to ~/.local/radiantwave/license.txt.

Misc
- "Please connect to WiFi" only shows when no WiFi is joined AND the internet
  is unreachable (fixes the NetworkManager-missing and Ethernet cases).
- Added unit tests for the audio-download warning, license scheduling policy,
  license request shape, and the new settings-menu entry.
This commit is contained in:
NeilClack
2026-10-14 10:58:40 -05:00
parent 9b57e48969
commit c3b3d6774a
21 changed files with 999 additions and 52 deletions
+12
View File
@@ -12,6 +12,18 @@ constexpr const char* KV_LICENSE_KEY = "license_key";
// outages do not revoke a known-good license.
constexpr const char* KV_LICENSE_LAST_VERIFIED = "license_last_verified";
// The license key/email pair the most recent completed check used, and its
// outcome ("valid"/"invalid"). An invalid pair is not re-checked until one of
// the two stored values changes, so a slow device does not hammer the portal.
constexpr const char* KV_LICENSE_CHECKED_KEY = "license_checked_key";
constexpr const char* KV_LICENSE_CHECKED_EMAIL = "license_checked_email";
constexpr const char* KV_LICENSE_CHECK_STATUS = "license_check_status";
// Unix epoch seconds of the last license check attempt (success or failure).
// Anchors the hourly re-check of a valid license; an overdue check runs
// immediately on the next boot instead of waiting a fresh hour.
constexpr const char* KV_LICENSE_LAST_CHECK = "license_last_check";
// The System Name the user typed on the Kiosk (trimmed). A human-readable label
// set only here; never a reference or key.
constexpr const char* KV_SYSTEM_NAME = "system_name";