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:
@@ -190,7 +190,7 @@ static void RenderAddressDropdown(App* app, float width) {
|
||||
|
||||
// Build preview string
|
||||
if (!app->isConnected()) {
|
||||
s_source_preview = TR("not_connected");
|
||||
s_source_preview = TR(app->isLiteBuild() ? "lite_no_wallet_short" : "not_connected");
|
||||
} else if (s_selected_address_idx >= 0 &&
|
||||
s_selected_address_idx < (int)state.addresses.size()) {
|
||||
const auto& addr = state.addresses[s_selected_address_idx];
|
||||
@@ -509,7 +509,7 @@ void RenderReceiveTab(App* app)
|
||||
DrawGlassPanel(dl, emptyMin, emptyMax, glassSpec);
|
||||
dl->AddText(sub1, sub1->LegacySize,
|
||||
ImVec2(emptyMin.x + Layout::spacingXl(), emptyMin.y + Layout::spacingXl()),
|
||||
OnSurfaceDisabled(), TR("waiting_for_daemon"));
|
||||
OnSurfaceDisabled(), TR(app->isLiteBuild() ? "lite_no_wallet" : "waiting_for_daemon"));
|
||||
dl->AddText(capFont, capFont->LegacySize,
|
||||
ImVec2(emptyMin.x + Layout::spacingXl(), emptyMin.y + Layout::spacingXl() + sub1->LegacySize + S.drawElement("tabs.receive", "empty-state-subtitle-gap").size),
|
||||
OnSurfaceDisabled(), TR("addresses_appear_here"));
|
||||
|
||||
@@ -230,7 +230,7 @@ static void RenderSourceDropdown(App* app, float width) {
|
||||
|
||||
// Build preview string for selected address
|
||||
if (!app->isConnected()) {
|
||||
s_source_preview = TR("not_connected");
|
||||
s_source_preview = TR(app->isLiteBuild() ? "lite_no_wallet_short" : "not_connected");
|
||||
} else if (s_selected_from_idx >= 0 &&
|
||||
s_selected_from_idx < (int)state.addresses.size()) {
|
||||
const auto& addr = state.addresses[s_selected_from_idx];
|
||||
@@ -890,7 +890,7 @@ static void RenderActionButtons(App* app, float width, float vScale,
|
||||
|
||||
if (!can_send && ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenDisabled)) {
|
||||
if (!app->isConnected())
|
||||
ImGui::SetTooltip("%s", TR("send_tooltip_not_connected"));
|
||||
ImGui::SetTooltip("%s", TR(app->isLiteBuild() ? "lite_no_wallet_short" : "send_tooltip_not_connected"));
|
||||
else if (state.sync.syncing)
|
||||
ImGui::SetTooltip("%s", TR("send_tooltip_syncing"));
|
||||
else if (s_from_address[0] == '\0')
|
||||
|
||||
@@ -578,7 +578,8 @@ void RenderTransactionsTab(App* app)
|
||||
{
|
||||
if (!app->isConnected()) {
|
||||
ImGui::Dummy(ImVec2(0, 20));
|
||||
Type().textColored(TypeStyle::Caption, OnSurfaceDisabled(), TR("not_connected"));
|
||||
Type().textColored(TypeStyle::Caption, OnSurfaceDisabled(),
|
||||
TR(app->isLiteBuild() ? "lite_no_wallet" : "not_connected"));
|
||||
} else if (state.transactions.empty()) {
|
||||
ImGui::Dummy(ImVec2(0, 20));
|
||||
if (txLoading) {
|
||||
|
||||
Reference in New Issue
Block a user