Files
radiantwave/src/settings_menu.h
T
NeilClack c3b3d6774a 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.
2026-10-14 10:58:40 -05:00

33 lines
835 B
C++

#pragma once
#include <string>
#include <vector>
namespace radiantwave::settings {
// Identifies a page reachable from the System Settings menu.
enum class SystemSettingId {
EmailAddress,
LicenseKey,
ManualValidateLicense,
SystemName,
Schedule,
WiFiSetup,
Timezone,
DateFormat,
};
// One row in the System Settings menu. `label` is what the user sees;
// `id` selects the page the row opens.
struct SystemSettingEntry {
std::string label;
SystemSettingId id;
};
// The ordered System Settings entries. Adding a future setting (System Name in
// Phase 2, Schedule toggle in Phase 3) is a single entry here plus its page
// wiring — no new menu plumbing. Kept free of SDL so it is unit-testable.
std::vector<SystemSettingEntry> systemSettingEntries();
} // namespace radiantwave::settings