feat(lite): ObsidianDragonLite Network tab — server browser
A lite-wallet-only "Network" tab (full-node keeps the Peers tab; exactly one shows per variant) to manage lightwalletd servers, replacing the basic selector that was in Settings. - Card list of servers with per-server latency + status dot, DNS host + resolved IP, and an Official/Custom pill. Official DragonX servers get a glowing outline. - Pick a server (Sticky) by clicking its card, or toggle "use a random server" (Random mode); selection applies immediately (App::rebuildLiteWallet(force=true) tears down + rebuilds the controller against the new server and resyncs — its dtor detaches the uninterruptible sync thread, so this doesn't block). - Add custom servers; hide/unhide servers (persisted set, revealed by a "Show hidden" toggle). - Latency/IP come from a new background probe (util/LiteServerProbe): libcurl CONNECT_ONLY does the TCP+TLS handshake (works for gRPC lightwalletd, no HTTP response needed), recording APPCONNECT_TIME as latency and CURLINFO_PRIMARY_IP. Auto-runs on tab open + a Refresh button. Wiring: WalletUiSurface::LiteNetwork (gated !fullNodePagesAvailable) + NavPage::LiteNetwork in the sidebar + app.cpp dispatch; settings gains a hidden-servers set; isOfficialLiteServer() added to lite_connection_service. The Settings page lite-server selector + its plumbing are removed (single source of truth = the tab). Reuses the existing server model (LiteServerPreference, Sticky/Random, selectLiteServer) and UI primitives (DrawGlassPanel, ThemeEffects glow, peers-tab ping-dot idiom). Unit-tested (liteServerHost, isOfficialLiteServer) + an env-gated live probe (verified vs lite.dragonx.is: online, latency, IP). Both variants + lite-backend build; suite passes; hygiene clean; GUI smoke-launched without crash. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -31,6 +31,7 @@ enum class NavPage {
|
||||
// --- separator ---
|
||||
Console,
|
||||
Peers,
|
||||
LiteNetwork, // lite-only "Network" tab (full-node uses Peers); exactly one shows per variant
|
||||
Explorer,
|
||||
Settings,
|
||||
Count_
|
||||
@@ -52,7 +53,8 @@ inline const NavItem kNavItems[] = {
|
||||
{ "Mining", NavPage::Mining, "TOOLS", "mining", "tools" },
|
||||
{ "Market", NavPage::Market, nullptr, "market", nullptr },
|
||||
{ "Console", NavPage::Console, "ADVANCED","console", "advanced" },
|
||||
{ "Network", NavPage::Peers, nullptr, "network", nullptr },
|
||||
{ "Network", NavPage::Peers, nullptr, "network", nullptr },
|
||||
{ "Network", NavPage::LiteNetwork, nullptr, "network", nullptr },
|
||||
{ "Explorer", NavPage::Explorer, nullptr, "explorer", nullptr },
|
||||
{ "Settings", NavPage::Settings, nullptr, "settings", nullptr },
|
||||
};
|
||||
@@ -78,6 +80,7 @@ inline wallet::WalletUiSurface NavPageSurface(NavPage page)
|
||||
case NavPage::Market: return wallet::WalletUiSurface::Market;
|
||||
case NavPage::Console: return wallet::WalletUiSurface::Console;
|
||||
case NavPage::Peers: return wallet::WalletUiSurface::Peers;
|
||||
case NavPage::LiteNetwork: return wallet::WalletUiSurface::LiteNetwork;
|
||||
case NavPage::Explorer: return wallet::WalletUiSurface::Explorer;
|
||||
case NavPage::Settings: return wallet::WalletUiSurface::Settings;
|
||||
default: return wallet::WalletUiSurface::Overview;
|
||||
@@ -101,6 +104,7 @@ inline const char* GetNavIconMD(NavPage page)
|
||||
case NavPage::Market: return ICON_MD_TRENDING_UP;
|
||||
case NavPage::Console: return ICON_MD_TERMINAL;
|
||||
case NavPage::Peers: return ICON_MD_HUB;
|
||||
case NavPage::LiteNetwork: return ICON_MD_HUB;
|
||||
case NavPage::Explorer: return ICON_MD_EXPLORE;
|
||||
case NavPage::Settings: return ICON_MD_SETTINGS;
|
||||
default: return ICON_MD_HOME;
|
||||
|
||||
Reference in New Issue
Block a user