polish(lite): lite-appropriate wording for no-wallet/connection states
In lite builds there is no daemon, and isConnected() now tracks the lite wallet, so the full-node "not connected / waiting for daemon" wording was misleading when no wallet is open. Add two strings (lite_no_wallet, lite_no_wallet_short; English built-ins, so other languages fall back until translated) and use them in lite: - receive/send address preview + receive empty-state overlay + send "can't send" tooltip + transactions empty state -> "No wallet open [— create or open one in Settings]" instead of daemon wording. - Status bar: the red indicator shows "No wallet open" (not "Disconnected") in lite; the P2P peer count is skipped (lite has no peers); and the redundant full-node connection-detail line is suppressed (connection_status_ set to "Connected"/"" from the lite wallet state). Full-node wording unchanged (all gated on isLiteBuild()). Build + run clean (no RPC noise), tests pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -418,6 +418,9 @@ void App::update()
|
||||
// A wallet is open only after a successful backend init against the lite server, so this
|
||||
// is a non-blocking proxy for "lite backend operational".
|
||||
state_.connected = lite_wallet_->walletOpen();
|
||||
// Suppress the status bar's full-node connection-detail line in lite ("" and "Connected"
|
||||
// are both hidden); the connected/no-wallet indicator + sync status convey lite state.
|
||||
connection_status_ = state_.connected ? "Connected" : "";
|
||||
|
||||
wallet::LiteWalletAppRefreshModel liteModel;
|
||||
if (lite_wallet_->takeRefreshedModel(liteModel)) {
|
||||
@@ -1551,7 +1554,8 @@ void App::renderStatusBar()
|
||||
ImGui::TextColored(ImVec4(0.8f, 0.2f, 0.2f, dotOpacity), ICON_MD_CIRCLE);
|
||||
ImGui::PopFont();
|
||||
ImGui::SameLine(0, sbIconTextGap);
|
||||
ImGui::Text("%s", TR("disconnected"));
|
||||
// Lite has no daemon connection; "disconnected" here means no wallet is open.
|
||||
ImGui::Text("%s", TR(isLiteBuild() ? "lite_no_wallet_short" : "disconnected"));
|
||||
}
|
||||
|
||||
// Block height
|
||||
@@ -1622,7 +1626,8 @@ void App::renderStatusBar()
|
||||
ImGui::TextColored(ImVec4(1.0f, 0.8f, 0.0f, 1.0f), TR("sb_syncing_basic"),
|
||||
state_.sync.verification_progress * 100.0, blocksLeft);
|
||||
}
|
||||
} else if (state_.connected) {
|
||||
} else if (state_.connected && !isLiteBuild()) {
|
||||
// Lite has no P2P peers (the lite server isn't a peer set); skip the peer count.
|
||||
ImGui::Text(TR("sb_peers"), state_.peers.size());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user