diff --git a/src/ui/windows/send_tab.cpp b/src/ui/windows/send_tab.cpp index ed92004..daf981d 100644 --- a/src/ui/windows/send_tab.cpp +++ b/src/ui/windows/send_tab.cpp @@ -56,6 +56,9 @@ static bool s_sending = false; static double s_status_timestamp = 0.0; static bool s_status_success = false; static std::string s_result_txid = ""; +static double s_result_amount = 0.0; // captured at send dispatch, for the success card (F093) +static std::string s_result_recipient = ""; // contact label or truncated address, captured at dispatch +static bool s_view_history_requested = false; // success-card "View in History" → handled in RenderSendTab static double s_send_start_time = 0.0; @@ -700,7 +703,15 @@ static void RenderTxProgress(ImDrawList* dl, float x, float y, float w, ImVec2 iSz = iconFont->CalcTextSizeA(iconFont->LegacySize, 1000.0f, 0.0f, checkIcon); dl->AddText(iconFont, iconFont->LegacySize, ImVec2(ix, iy), Success(), checkIcon); - dl->AddText(body2, body2->LegacySize, ImVec2(ix + iSz.x + schema::UI().drawElement("tabs.send", "progress-icon-text-gap").size * dp, iy), Success(), TR("send_tx_sent")); + // Richer confirmation: "Sent 2.5000 DRGX to Alice" instead of a bare "Transaction sent". (F093) + if (!s_result_recipient.empty()) { + char amtbuf[48]; + snprintf(amtbuf, sizeof(amtbuf), "%.4f %s", s_result_amount, DRAGONX_TICKER); + snprintf(buf, sizeof(buf), TR("send_sent_summary"), amtbuf, s_result_recipient.c_str()); + } else { + snprintf(buf, sizeof(buf), "%s", TR("send_tx_sent")); + } + dl->AddText(body2, body2->LegacySize, ImVec2(ix + iSz.x + schema::UI().drawElement("tabs.send", "progress-icon-text-gap").size * dp, iy), Success(), buf); if (!s_result_txid.empty()) { float txY = iy + body2->LegacySize + schema::UI().drawElement("tabs.send", "txid-y-offset").size * dp; @@ -712,7 +723,13 @@ static void RenderTxProgress(ImDrawList* dl, float x, float y, float w, snprintf(buf, sizeof(buf), TR("send_txid_label"), dispTxid.c_str()); dl->AddText(capFont, capFont->LegacySize, ImVec2(ix + schema::UI().drawElement("tabs.send", "txid-label-x-offset").size * dp, txY), OnSurfaceDisabled(), buf); - ImGui::SetCursorScreenPos(ImVec2(pMax.x - schema::UI().drawElement("tabs.send", "txid-copy-btn-right-offset").size * dp, txY - schema::UI().drawElement("tabs.send", "txid-copy-btn-y-offset").size * dp)); + // History + Copy, right-aligned as a pair (History drawn first, Copy via SameLine to its right). + float btnY = txY - schema::UI().drawElement("tabs.send", "txid-copy-btn-y-offset").size * dp; + float copyRightOff = schema::UI().drawElement("tabs.send", "txid-copy-btn-right-offset").size * dp; + ImGui::SetCursorScreenPos(ImVec2(pMax.x - copyRightOff - 78.0f * dp, btnY)); + if (TactileSmallButton(TR("send_view_history"), schema::UI().resolveFont("button"))) + s_view_history_requested = true; // RenderSendTab (has app) performs the navigation + ImGui::SameLine(0, Layout::spacingSm()); if (TactileSmallButton(TR("copy"), schema::UI().resolveFont("button"))) { ImGui::SetClipboardText(s_result_txid.c_str()); Notifications::instance().info(TR("send_txid_copied")); @@ -981,6 +998,14 @@ void RenderSendConfirmPopup(App* app) { } else { s_sending = true; s_send_start_time = ImGui::GetTime(); + // Capture what's being sent now (the form is cleared in the callback) so the success card + // can say "Sent X to